centos6 online installation configuration MySql

1. Check the available packages to find the remote server mysql
yum Search mysql
install
yum install version -y
2. Use the pipe to see if the installed
rpm -qa | grep mysql
to view the install mysql-line path
the Find / -name mysql *
3. start mysql server
service mysqld Start
JPS
stop mysql server
Service mysqld sTOP
4. enter mysql
mysql -u root
Show databases; check the database
to exit the MySQL
exit
5. set a password
to create a server
. GRANT ALL PRIVILEGES ON * * TO 'root' @ '%' IDENTIFIED BY 'root' WITH GRANT OPTION;
enter the mysql database
use mysql;
see user tables
select host, user, password from user ;
delete other users in addition to%
the delete user from the WHERE Host = '%';!
quit MySQL restart the service
exit
mysqld STOP-Service
-Service Start mysqld
reenter mysql
mysql -u -p the root
password
the root
6. The process mysql Chinese distortion
view mysql encoding format
show variables like 'character%';
edit profile
/etc/my.cnf vim
in the first row [ insert mysqld] the
character-set-server = utf8
last inserted
[Client]
default = UTF8-Character-SET
[mysql]
default = UTF8-Character-SET
7. the mysql import database files
source path

Guess you like

Origin www.cnblogs.com/wangmeng960111/p/10990027.html