简体   繁体   中英

mysql.server start wont start the mysql server

Whenever I type "mysql.server start" on OSX terminal I get this error:

Maria-MacBook-Pro:~ mariakocsis$ mysql.server start Starting MySQL ./usr/local/Cellar/mysql/5.7.22/bin/mysqld_safe: line 647: /var/lib/mysql/Maria-MacBook-Pro.local.err: No such file or directory Logging to '/var/lib/mysql/Maria-MacBook-Pro.local.err'. 2018-05-31T12:12:39.6NZ mysqld_safe Directory '/var/lib/mysql' for UNIX socket file don't exists. /usr/local/Cellar/mysql/5.7.22/bin/mysqld_safe: line 144: /var/lib/mysql/Maria-MacBook-Pro.local.err: No such file or directory ERROR! The server quit without updating PID file (/var/lib/mysql/Maria-MacBook-Pro.local.pid). Maria-MacBook-Pro:~ mariakocsis$ sudo chmod -R 777 /usr/local/mysql/ chmod: /usr/local/mysql/: No such file or directory Maria-MacBook-Pro:~ mariakocsis$

Even if I try to run mysql by MAMP, its not working.

Before the error I followed this commands: cd ; nano .bash_profile

/usr/local/mysql/bin/mysql -v

/usr/local/Cellar/mysql/5.7.22/bin/mysqld_safe ; exit;

source ~/.bash_profile mysql -v

in your terminal type in: mysql

source ~/.bash_profile mysql -v

SHOW GLOBAL VARIABLES LIKE 'PORT';

sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-5.7 mysql-client-core-5.7

sudo nano /etc/my.cnf

How can I reset this things? And how I can start mysql server?

使用以下命令:启动mysql:mysqld start停止mysql:mysqld stop重启:mysqld restart

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM