Linux操作mysql相关命令
http://fuyong.me/2017/02/08/configuration-development-environment/
https://blog.csdn.net/u013929284/article/details/70230799
常用命令:
查看mysql状态:ps -ef|grep mysqld
重启mysql:/usr/sbin/mysqld restart
停止mysql:/usr/sbin/mysqld stop
启动mysql:/usr/sbin/mysqld start
登陆mysql数据库: mysql -u root -p(其中root为用户名,输入该命令后,才会让你继续输入密码)
更新root密码:mysql> UPDATE user SET Password=PASSWORD("newpassword") where USER="root";
最新版MySQL更新root密码:mysql> UPDATE user SET authentication_string=PASSWORD("newpassword") where USER="root";
刷新权限 :mysql> FLUSH PRIVILEGES;
退出mysql:mysql> quit
查询所有的库:mysql> show databases;
进入数据库“eduyun_2015_sp1”是库名:mysql> use eduyun_2015_sp1;
查询所有的表:mysql> show tables;
查询表,进行增删改查“ey_transcodesplit”是表:mysql> select * from ey_transcodesplit;
退出:"exit" + 回车;
以上是 Linux操作mysql相关命令 的全部内容, 来源链接: utcz.com/z/513290.html