mysql 使用

mysql -uroot -h127.0.0.1 -P3306 –p 登陆本地的机器 grant all privileges on *.* to [email protected] identified by '1'; (必须使用identified,否则可能不使用密码就可以进入到数据库中) grant all privileges on *.* to mysql@’%’ flush privileges;

 source ~/normal_moba_account.sql

 use moba_db_74;



INSERT INTO `dbversion` VALUES (8,0);

 SELECT * FROM account_main WHERE accountnick LIKE '%谭%';

drop database moba_affair_74;  

 

 

mysqladmin -u root password 123456

 

 (3)、有密码时进入Mysql:

# mysql -u root -p 

 

 

# yum install mysql-server mysql


2、查看是否安装正确

# chkconfig --list mysqld

 

# service mysqld start

 

 (2)、停止服务: 

# mysqladmin -u root -p shutdown

 

 (3)、加入开机启动:

# chkconfig mysqld on

 (4)、移除开机启:  

 # chkconfig mysqld off

你可能感兴趣的:(mysql)