Such as the title: How to build a mysql environment on Alibaba Cloud server ecs by yourself. If you use npm install (node ??is installed), how to modify the mysql configuration file
Always report an error
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
I tried many online solutions, such as adding skip-grant-tables
to skip entering the password, but my mysql restart is not easy to use
[root@iZ2ze6yh0lvendgbwk6k4tZ ~]# service mysqld restart
Stopping mysqld: [ OK ]
MySQL Daemon failed to start.
Starting mysqld: [FAILED]
Server novice please give me some advice
yum installation
Binary package installation
Compile and install
Start the error report and look at the error log of mysql
Login permission error, skip-grant-tables
After skipping, change the mysql user password
Solved, my problem:
skip grunt tables
放錯(cuò)位置了 我放在[mysqld_safe]
的塊下面了 放在[mysqld]
That’s it
The next restart failed. Looking at the error log, 3306 was occupied. kill -9 [pid]
發(fā)現(xiàn)殺掉后立刻重啟,我用kill [pid]
Kill directly and found that the 3306 port was not occupied
Next, connect to mysql. The error message is that there is no mysql.sock file. Maybe I deleted it by mistake before. I restarted the server and then service mysqld restart
重啟,找到了mysql.sock ,之后發(fā)現(xiàn)my.cnf 文件下的socket位置與它找的不一樣,用ln -s
soft-connected it
Finally successful~