2013年7月31日星期三

mysql5.5 under linux installation

 

# rpm-qa | grep-i mysql view installed mysql version

 

If you have an existing mysql version  delete

 

installation services and client, go to Oracle official website to download:

 

# rpm-ivh MySQL-server-5.5.28-1.linux2.6.i386.rpm

 

# rpm-ivh MySQL-client-5.5.28-1.linux2.6.i386.rpm

 

after installation, the following message will appear, prompting the design do not forget the root password, and other information.

 

then see whether the service mysql start  # netstat-nat

 

see 3306 as the port number, it shows service startup, the default port is 3306, if not start, then open the service # service mysql start start mysql service.

 

then enter the mysql, if the following message appears, indicating success.

 

Welcome to the MySQL monitor. Commands end with; or \ g. Your MySQL connection id is 1 Server version: 5.5.16 MySQL Community Server (GPL)

 

Copyright (c) 2000, 2011, Oracle and / or its affiliates. All rights reserved.

 

Oracle is a registered trademark of Oracle Corporation and / or its affiliates. Other names may be trademarks of their respective owners.

 

Type 'help;' or '\ h' for help. Type '\ c' to clear the current input statement.

 

Go to mysql database: mysql> use mysql;

 

Then look at the root of the situation select user, password form user;

 

Change Password  update user set password = password ('newpassword') where user = 'root' and host = 'root' or host = 'localhost';

 

At this point  mysql is installed successfully's.

 

However, remote access or not, there are two places, the first is the database settings, and the second is the firewall. Generally can be directly connected to the database has been a success. But no ROOT privileges, if Rom, like me, must have been blocked by the firewall.

 

MYSQL database table can be controlled by visiting privileges, so we want to change about it, so we have a ROOT permissions.

 

 
  myql can remotely log  
 
  Setting mysql password  
 
  mysql>; USE mysql;      
mysql>; UPDATE user SET Password = PASSWORD ('newpassword') WHERE user = 'root';      
mysql>; FLUSH PRIVILEGES;      
1.2.3 allow remote login      
mysql-u root-p      
Enter Password:      
mysql> GRANT ALL PRIVILEGES ON *. * TO 'username' @ '%' IDENTIFIED BY 'password' WITH GRANT OPTION;      
after the completion can remotely manage mysql mysql-front up.      
set to boot      
chkconfig mysqld on  

没有评论:

发表评论