php - Cannot log in to the MySQL server error


Sorry for posting this error which has been posted so many times and on multiple forums.

I'm having a hard time resolving this issue.OSX Yosemite, 10.10 I installedmysql usinghome brew. Can log into mysql as

mysql -u root -p The password is null.

Then I ran

mysqladmin -u root password '' , ienull password for mysqladmin.

I didlocalhost/~username/phpmyadmin/setup to I edited it with

$cfg['Servers'][$i]['AllowNoPasswordRoot'] = TRUE;

$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;

I uninstalled and installed again mysql with homebrew, did all steps again, removed*.err file which gave socket error.

I tried userroot with passwordmysql, ``,password,my_machine_password Not a single thing works.! I've following setting:

$cfg['Servers'][$i]['user'] = 'root';

$cfg['Servers'][$i]['password'] = '';

Irestart apache everytime. What am I missing?

Nothing seems to let me through it. All posts direct to same steps I've been doing, yet nothing is able to get pass this harrowing process.! Kindly help..




OK. Here's the thing which haunted me for hours. I didn't find this on on any tutorials there. But I found this on youtube videos. When youbrew install mysql, you will have null as your password. You can change if you'd like to.

But also do following:

Step 1: sudo mkdir /var/mysql

Step 2: sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock

Step 3: restart your mysql.server

Now follow phpmyadmin setup instructions. You should be able to get in with your root username, and password.

People are also looking for solutions to the problem: private - nested classes php or other method


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.