Mac ZendServer post re-boot and MySql doesn't work

General discussion forum for the Zend Server

Mac ZendServer post re-boot and MySql doesn't work

Postby andr9282 on Thu Jan 12, 2017 4:50 pm

However - PHPMyAdmin does. #Mystery

Keep in mind yesterday this worked awesomely...

So;
$conn = new mysqli($servername, $username, $password, 'test');
returns the following error;
Warning: mysqli::__construct(): (HY000/2002): No such file or directory in /usr/local/zend/apache2/htdocs/test/test.php on line 9

Using;
$conn = mysql_connect($servername, $username, $password, 'test');

returns the following error;
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /usr/local/zend/apache2/htdocs/test/test.php:10 Stack trace: #0 {main} thrown in /usr/local/zend/apache2/htdocs/test/test.php on line 10

MySql doesn't seem to be started;
ERROR 2002 (HY000): Can't connect to local MySQL Server through Socket

Any ideas folks or become a bum, live on the beach, and play the saxophone...
andr9282
 
Posts: 2
Joined: Thu Jan 12, 2017 4:17 pm

Re: Mac ZendServer post re-boot and MySql doesn't work

Postby andr9282 on Thu Jan 12, 2017 4:53 pm

So here's how I solved it.
Permissions need to be over ZEND directory on Mac;
Everyone - Read
YOU (your user ID) - R/W (this way maybe you can edit your scripts!)
zend - R/W for good measure - this MAYBE too much permission.

when MySql is mad at permissions - it ignores the startup configuration file, named my.cnf - and ignores it (not kidding it literally ignores it!).

Controlling on the mac is as follows;
mysql.server stop/start/status
andr9282
 
Posts: 2
Joined: Thu Jan 12, 2017 4:17 pm


Return to Zend Server

Who is online

Users browsing this forum: Google [Bot] and 2 guests