1. Installing mysql in Linux is simple.
# Apt-get install mysql-server-5.0
After installation, set the password. If the password is 'sa'
2. After the installation is complete, log on to the Local Machine
# Mysql-u root-p
Enter the password
This is generally normal [6688 e-commerce website www.6688.cc]
However, a problem has been found recently. It is normal to log on to the local computer, but on other computers, mysql connected to linux always reports
Can't connect to MySQL server on '192. 168.162.129 '(192) Error
192.168.162.129 this is the linux ip address. The linux Server can be pinged to the Internet, and the linux Server can be pinged to the Internet.
After searching on the internet, I configured a statement in the/etc/mysql/my. cnf file.
Bind-address = 127.0.0.1
This sentence means that, in consideration of security, only listening to the connection of the Local Machine
The solution on the Internet is to annotate this sentence, or change it to bind-address = 0.0.0.0.
However, after I comment out the line,
When I use mysql administrator on xp to connect to mysql on linux, an error is returned.
1130 Host 'xx. XX. XX. xx' is not allowed to connect to the mysql server
This is because mysql does not allow remote connection by default.
Authorize this host.
There are two methods
1. grant authorization
If you want to authorize 192.168.1.91
Advanced to mysql
Then use
Mysql #> grant all privileges on *. * TO 'root' @ '92. 168.1.91 'identified by 'youpassword' with grant option;
After modification, remember to use flsh for privileges.
Mysql> flush privileges
Second, modify the table
Mysql> update user set host = '%' where user = 'root ';
Mysql> flush privileges;
Then use mysql administrator of xp to connect.