一、linux下查看mysql服务的两种方式:
方式一:
ps -ef|grep mysql
方式二:
netstat -nlp
二、linux下启动mysql服务的两种方式:
命令行方式:
cd /usr/bin
./mysqld_safe &
服务方式:
service mysqld start
如果服务在启动状态,直接重启服务用以下命令:
service mysqld restart
三、linux下关闭mysql服务的两种方式:
命令行方式:
[root@localhost ~]mysqladmin -u root shutdown
服务方式:
[root@localhost ~]service mysql stop
四、配置文件
/etc/my.cnf
出现第一次连接慢,解决方案:在mysql 的配置文件中 配置 skip-name-resolve