Linux系统如何安装配置Mysql服务?
1、以root身份登录linux系统

2、安装mysql-server
apt-get install mysql-server

3、查看是否安装成功并启动
netstat -tap | grep mysql

4、mysql在安装完成后自动启动,root账号密码为系统root密码
mysqladmin --version 查看mysql版本
sudo service mysql status 查看mysql状态
sudo service mysql start 启动mysql服务
sudo service mysql stop 停止mysql

5、使用root登录mysql:
shell>mysql -u root -p

6、添加其他账号并授权:
mysql>create user 'admin'@'localhost' identified by 'pwd';
mysql>grant all privileges on *.* to 'admin'@'localhost' with grant option;
指定域名,指定权限,指定database
mysql>create user 'dever'@'%.xxx.com' identified by 'pwd';
mysql>grant select,delete,drop,insert,update,create on your_database.* to 'dever'@'%.xxx.com';
7、查看用户 select host,user from user;

8、开启mysql远程访问:
修改mysql配置文件:
vi /etc/mysql/mysql.conf.d/mysqld.cnf
把其中bind-address = 127.0.0.1注释掉:

9、登陆mysql修改权限
mysql>grant all on *.* to root@'%' identified by 'pwd';
flush privileges;
service mysql restart