Support the ongoing development of Laravel.io →
Installation Configuration Testing
Last updated 1 year ago.
0

Are your database settings correct?

0

did you even LOOK at the line it is showing you? it clearly says case 2005.. which is where i would start.. and that google search led me to this:

http://stackoverflow.com/questions/16580370/mysql-error-2005-u...

localhost is not the right setting.

What i would do is log in to mysql using the command line with -h flag e.g. mysql -h 127.0.0.1 -u user -p replace 127.0.0.1 with whatever might work.. and when it starts working use that in your laravel.. basically trial & error

0

Yes they are correct... Thanks!!!!

thomastkim said:

Are your database settings correct?

0

Hello Shez, thanks for your reply, Yes I tried it all, tested with localhost, 127...., ssh and tried connecting to both, localhost works but 127.0.0.1 would not.

e.g.

Using localhost

@**.com [~]# mysql -h localhost -u ******** -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 146474 Server version: 5.6.23 MySQL Community Server (GPL)

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

Using 127.0.0.1

@**.com [~]# mysql -h 127.0.0.1 -u ******** -p Enter password: ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (111)

updated composer also, reinstalled it, etc...

Do you believe it has something to do with the fact that 127.0.0.1 wont connect? I mean is there another dependency that uses this instead of "localhost"?

My config/database.php file has "localhost" right now.

Thanks

shez1983 said:

did you even LOOK at the line it is showing you? it clearly says case 2005.. which is where i would start.. and that google search led me to this:

http://stackoverflow.com/questions/16580370/mysql-error-2005-u...

localhost is not the right setting.

What i would do is log in to mysql using the command line with -h flag e.g. mysql -h 127.0.0.1 -u user -p replace 127.0.0.1 with whatever might work.. and when it starts working use that in your laravel.. basically trial & error

0

forget laravel for a second.. create a new script (php) & try to connect to mysql using PDO or mysql_query or something.. and see what happens..

are mysql & your server on the same machine?

0

Hello Again Shez, thanks for taking the time to respond, I created this simple mysqli connect which successfully returned the total records... However Laravel still not running.

http://206.214.216.52/testmysql/

Yes, Mysql and server are the same machine.

I appreciate it.

shez1983 said:

forget laravel for a second.. create a new script (php) & try to connect to mysql using PDO or mysql_query or something.. and see what happens..

are mysql & your server on the same machine?

Last updated 8 years ago.
0

Here is a PDO example. it works, however laravel still not running...

http://206.214.216.52/testmysql/test2.php

shez1983 said:

forget laravel for a second.. create a new script (php) & try to connect to mysql using PDO or mysql_query or something.. and see what happens..

are mysql & your server on the same machine?

Last updated 8 years ago.
0

Ping...

Thanks in advance, so far, mysqli and PDO connect just fine... however Laravel still not able to run, Anyone has a clue?

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.