Link to home
Start Free TrialLog in
Avatar of MeridianManagement
MeridianManagementFlag for United States of America

asked on

cannot access mysql via command line or workbench with standard zend server CE on mac os x / unix

So, i'm not liking how Zend Server works, it's very difficult and not laid out well. For example I'm looking at the Server Info page, and it tells me everything I don't want to know, but not the important stuff like Where is my document root? What port do I use to connect to the web server (by default it is 10088)? These seem to me to be basic stuff that makes the learning curve for zend much more difficult. ANYWAY enough ranting about that. Reading the documentation eventually gleamed those facts for me.

Still, I cannot seem to be able to find out how to connect to this elusive mysql server. I know it's running because I can open phpmyadmin. But this is not my preferred way of working.. c'mon it's phpmyadmin. So I try opening up terminal and access and seeing if I could command line in.

NOPE "mysql" command does not work there.

So maybe for whatever reason I have to hunt down the paths because they're not binded to my bash profile on a standard install. Fine, but then I fire up MySQL workbench and try using localhost:3306 with root user. Nope, can't connect. Okay so maybe we're on some non-standard port? I check the zend server configuration panel and it shows the default. Just in case, I manually change it to 3306. Try again, Nope workbench can't connect.

Okay fine, maybe it's something else. If PHPmyAdmin can work of all things, then I'll just figure it out from pma's configuration. PMA config gleams no useful information. Basically it says localhost. GAH! I'm pulling my hair out.

Obviously, there is MySQL somewhere in this stupid Mac OS X box. I've used windows, XAMP, straight php apache on windows and Centos, never have I had this much trouble connecting before.

Any help would be much appreciated. I feel like a newb again.
ASKER CERTIFIED SOLUTION
Avatar of arnold
arnold
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MeridianManagement

ASKER

Okay I will try, but even if I find it, how come I cant access it using workbench?
Using workbench, make sure you connect to localhost with root as the username.
I do not know what you were trying.
Yay! half way there.
/usr/local/zend/mysql/bin/mysql -u root
the above command works and gets me into mysql

couldn't find my.cnf in etc but found it here:
/usr/local/zend/mysql/data/my.cnf
pasted some contents below

# this worked but not sure what it means
bash-3.2# apropos mysql
mysql_table(5)           - Postfix MySQL client configuration
mysql_table(5)           - Postfix MySQL client configuration

still can't connect using workbench
I'm using both standard tcpip, connecting to "localhost" and "127.0.0.1" using "root".

I've also tried TCP/IP over SSH.

Perhaps I have to do something to mysql to get it to listen to TCP connections?

-------------------------------------------------------

/usr/local/zend/mysql/bin/mysql.client  Ver 14.14 Distrib 5.1.50, for apple-darwin9.8.0 (i386) using readline 5.1

Connection id:          8
Current database:
Current user:           root@localhost
SSL:                    Not in use
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server version:         5.1.50 MySQL Community Server (GPL)
Protocol version:       10
Connection:             Localhost via UNIX socket
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    latin1
Conn.  characterset:    latin1
UNIX socket:            /usr/local/zend/mysql/tmp/mysql.sock
Uptime:                 22 hours 40 min 42 sec

# The following options will be passed to all MySQL clients
[client]
#password       = your_password
port            = 3306
socket          = /usr/local/zend/mysql/tmp/mysql.sock


[mysqld]
port = 3306
socket = /usr/local/zend/mysql/tmp/mysql.sock
skip-locking
key_buffer_size = 16K which options a program supports, run the program
max_allowed_packet = 1M
table_open_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 128K

Open in new window

user error, I ended up clicking local socket option and entered "/usr/local/zend/mysql/tmp/mysql.sock" and voila!