MySQL installation, password modification, remote login, solve the problem of not seeing the MySQL database

Source: Internet
Author: User

I used to develop it in a Windows environment, download it to a Linux environment, and there are a bunch of problems.

Note the following information about MySQL installation, password modification, and remote logon.

Http://dev.mysql.com/doc/refman/5.6/en/binary-installation.html

Shell> Groupadd MySQL Shell> Useradd-r-g MySQL Shell> CD/usr/local Shell> Tar zxvf/Path/to/MySQL-version-OS.Tar.gz Shell> Ln-SFull-path-to-mysql-version-OSMySQL Shell> CD MySQL Shell>Chown-r MySQL. Shell> Chgrp-r MySQL. Shell> Scripts/mysql_install_db -- user = MySQL Shell> Chown-r root. Shell> Chown-r Mysql Data # Next command is optionalshell> CP support-files/my-medium.cnf/etc/My. CNF Shell> Bin/mysqld_safe -- user = MySQL & # Next command is optionalshell> CP support-files/MySQL. Server/etc/init. d/MySQL. Server 

Frequently Used password changes:

Mysql-u root MySQL
Mysql> Update user SET Password = PASSWORD ("new password") where user = 'name ';
Mysql> flush privileges;
Mysql> quit

Authorize remote Logon:

You can use the authorization method and the table method, which makes it easier for you to grant permissions.

Authorization law:

Grant all privileges on *. * 'Myuser' @ '%' Identified by 'mypassword' with grant option; if you want to allow myuser to connect to the MySQL server from a host with IP address 192.168.1.3, and use mypassword as the password grant all privileges on *. * 'Myuser' @ '192. 168.1.3' Identified by 'mypassword' with grant option; if you want to allow the user myuser to connect to the ABC database of the MySQL server from the host whose IP address is 192.168.1.3, and use mypassword as the password grant all privileges on ABC. * 'Myuser' @ '192. 168.1.3' Identified by 'mypassword' with grant option; Then merge the rows: Flush privileges;

Table change method:

It may be that your account is not allowed to log on remotely, but only on localhost. At this time, you only need to log on to MySQL on the localhost computer and change the "host" entry in the "user" table in the "MySQL" database, from "localhost" to "%" mysql-u root-pvmwaremysql> use MySQL; mysql> Update user set host = '%' where user = 'root'; mysql> select host, user from user;

 

You cannot see the MySQL database

Http://hi.baidu.com/52happytime/item/e55b820aef61ae324ac4a3ca

 

Solve Chinese garbled characters

Http://blog.csdn.net/iinel/article/details/3895913

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.