What should I do if I cannot access mysql under Linux system?

Time: 2017-05-22Source: Huajun News NetworkAuthor: Xiaoyuer

What should I do if I cannot access mysql under Linux system? Let’s take a look at the solution with the Huajun editor.

1. Problems and exceptions

ThreadPoolAsynchronousRunner - com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@75d634ea -- APPARENT DEADLOCK! ! ! Complete Status:

Managed Threads: 3

Active Threads: 3

Active Tasks:

2. Find the reason

After trying to find out, it is definitely a MySQL permissions issue.

3. Solution process

1》 mysql -uroot -proot mydbName

2》 grant all privileges on *.* to wangs@‘%’ identified by ‘123456’;

3》flush privileges;

4》exit;

5》/etc/init.d/mysql restart

4. Description of the command

Enter mysql, the user is root, the password is root, the database is mydbName, -u means user, -p means password,

Add user wangs, all permissions, the database is *, the following .* is indispensable, % represents all remote IP addresses, if you want to limit the IP address, write the IP address separately,

The password is 123456. Note that the quotation marks ‘ are indispensable and are used to indicate that it is a string.

The above commands and processes cannot be omitted.

The above is the solution to the problem of being unable to access mysql under Linux system. When users encounter the same fault, they can find out the cause according to the abnormal situation of the problem, and then prescribe the right medicine to solve the problem.

Related articles更多>>

Popular recommendations