The root of the problem is mysql installed by root and started by default./mysqld Restart reports the following error;
Mysql installation directory is: /usr/local/mysql/
[root@SHB-L0120796 bin]# ./mysqld restart
2020-03-06T09:02:19.361027Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2020-03-06T09:02:19.361168Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
2020-03-06T09:02:19.361213Z 0 [Note] ./mysqld (mysqld 5.7.27) starting as process 29670 ...
2020-03-06T09:02:19.364761Z 0 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
2020-03-06T09:02:19.364806Z 0 [ERROR] Aborting
2020-03-06T09:02:19.364835Z 0 [Note] Binlog end
2020-03-06T09:02:19.367170Z 0 [Note] ./mysqld: Shutdown complete
Temporary solutions:
Root /mysqld –user=root start in the installation directory /usr/local/mysql/bin using root:./mysqld –user=root start
./mysqld --user=root start
Or try /usr/local/mysql/bin under the installation directory:
service mysqld start
Best solution: Without modifying the my.cnF file, execute the following command line
./mysqld --skip-grant-tables --skip-networking --user=root &
Read More:
- Centos7 executes the command service mysqld start and prompts Failed to start mysqld.service: Unit mysqld.service not loaded
- Error: attempting to operate on HDFS namenode as root
- It is an error to use a section registered as allowDefinition=’MachineToApplication’ beyond applicat
- As Error:Failed to find configured root that contains /storage/emulated/0/xxx/xxx/xxx.png
- Redirecting to /bin/systemctl stop mysqld.service
- Error in configuring Hadoop 3.1.3: attempting to operate on yarn nodemanager as root error
- Clion appears cmake error: could not find cmake_ Root! What is the problem and how to solve it?
- Error 1045 (28000): solution to access denied for user ‘root’ @’localhost ‘(using password: no)
- Vsftpd: 500 oops: vsftpd: refusing to run with writable root inside chroot() error
- Error: ~ /. Vuerc may be updated. Please delete it and re run vuercli in manual mode
- How to Fix failed to Connect to MySQL at localhost:3306 with user root
- Error 1045 (28000): access denied for user ‘root’ @’localhost ‘(using password: no)
- How to solve the failed to start switch root error during centos8.1 startup?
- A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
- MySQL forgot the root password
- A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
- RuntimeError: Unable to find a valid cuDNN algorithm to run convolution
- Fatal error: Unable to find local grunt.
- How to Root the Samsung Galaxy Note 2 (GT-N7100)
- CentOS7 nginx Failed to read PID from file /run/nginx.pid: Invalid argument?