MySQL installations fail to create grant table

.... just another MySQL newbie

I dabbled a bit a few years ago and everything was OK.

Now, after a few upgrades, my tables are gone including the Grant table. None of the other matters because it was just a test db of my own. But the loss of the Grant table has me stopped. The only table that will show for either version is the test table.

the basics:
I am running OsX 10.4.8 on a Dual 1G XServe
I have both v. 4.1.13 and 5.0.27 installed and I can start either.

I used the .pkg install and also ran the MYSQLStartupItem.pkg. I would prefer to set up the v 5.0 but would be happy with either. Attempts to run mysql installdb have failed for both versions.

Results of latest attempt
(working locally on the server itself):

x:/usr/local/mysql admin$ ls -l
total 88
-rw-r--r-- 1 root wheel 19071 Oct 20 20:22 COPYING
-rw-r--r-- 1 root wheel 5806 Oct 21 04:21 EXCEPTIONS-CLIENT
-rw-r--r-- 1 root wheel 7752 Oct 21 04:21 INSTALL-BINARY
-rw-r--r-- 1 root wheel 1380 Oct 20 20:22 README
drwxr-xr-x 53 root wheel 1802 Jan 17 17:50 bin
-rwxr-xr-x 1 root wheel 801 Oct 21 04:30 configure
drwxr-x--- 13 mysql wheel 442 Jan 17 19:17 data
drwxr-xr-x 4 root wheel 136 Oct 21 04:31 docs
drwxr-xr-x 64 root wheel 2176 Oct 21 04:31 include
drwxr-xr-x 10 root wheel 340 Oct 21 04:31 lib
drwxr-xr-x 4 root wheel 136 Oct 21 04:31 man
drwxr-xr-x 13 root wheel 442 Oct 21 04:31 mysql-test
drwxr-xr-x 3 root wheel 102 Oct 21 04:31 scripts
drwxr-xr-x 5 root wheel 170 Oct 21 04:31 share
drwxr-xr-x 31 root wheel 1054 Oct 21 04:31 sql-bench
drwxr-xr-x 14 root wheel 476 Oct 21 04:31 support-files
drwxr-xr-x 21 root wheel 714 Oct 21 04:31 tests
x:/usr/local/mysql admin$ scripts/mysql installdb --user=mysql
mkdir: ./data/mysql: Permission denied
chmod: ./data/mysql: Permission denied
mkdir: ./data/test: Permission denied
chmod: ./data/test: Permission denied
chown: ./data/mysql: Permission denied
chown: ./data/test: Permission denied
Installing all prepared tables
070118 19:37:58 [Warning] Can't create test file /usr/local/mysql-standard-5.0.27-osx10.4-powerpc/data/x.lower-test
070118 19:37:58 [Warning] Can't create test file /usr/local/mysql-standard-5.0.27-osx10.4-powerpc/data/x.lower-test
./bin/mysqld: Can't change dir to '/usr/local/mysql-standard-5.0.27-osx10.4-powerpc/data/' (Errcode: 13)
070118 19:37:58 [ERROR] Aborting

070118 19:37:58 [Note] ./bin/mysqld: Shutdown complete

./bin/mysql create_systemtables: line 766: 4963 Broken pipe cat <<END OFDATA
use mysql;
set table_type=myisam;
$c_d
$i_d

$c_h
$i_h

$c_u
$i_u

$c_f
$i_f

$c_t
$c_c

$c_ht
$c_hc
$c_hr
$c_hk

$c_tzn
$i_tzn
$c_tz
$i_tz
$c_tzt
$i_tzt
$c_tztt
$i_tztt
$c_tzls
$i_tzls

$c_p
$c_pp

END OFDATA

Installation of system tables failed!

Examine the logs in ./data for more information.
You can also try to start the mysqld daemon with:
./bin/mysqld --skip-grant &
You can use the command line tool
./bin/mysql to connect to the mysql
database and look at the grant tables:

shell> ./bin/mysql -u root mysql
mysql> show tables

Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in ./data that may be helpful.

The latest information about MySQL is available on the web at
http://www.mysql.com
Please consult the MySQL manual section: 'Problems running mysql installdb',
and the manual section that describes problems on your OS.
Another information source is the MySQL email archive.
Please check all of the above before mailing us!
And if you do mail us, you MUST use the ./bin/mysqlbug script!
x:/usr/local/mysql admin$ mysql -h localhost -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)
x:/usr/local/mysql admin$


I am trying to follow the directions from the mysql.com site but things just don't "seem" to be as they should be.

Sorry if this is covered on another post (can't see how it wouldn't be but I couldn't find it if it is).

Secondly I assume there is a command line command to change the /etc/hostconfig file from "MYSQL"="-YES-" to "MYSQL"="-NO-". The "MYSQLCOM=-YES-" is already there but follows the other one so can't run.

Mac 512K - MacMini(Intel) Mac OS X (10.4.8)

Mac 512K - MacMini Mac OS X (10.4.8)

Posted on Jan 18, 2007 5:17 PM

Reply
13 replies

Jan 18, 2007 8:55 PM in response to mudchucker

It's nto surprising it's failing.

The line:

<pre class=command>x:/usr/local/mysql admin$ scripts/mysql installdb --user=mysql</pre>

indicates you're currently logged in as 'admin'. However:

<pre class=command>drwxr-x--- 13 mysql wheel 442 Jan 17 19:17 data</pre>

indicates that the data directory is owned by 'mysql' and that's the only user that has write permission in that directory. Therefore admin can't create the files.

The solution is simple - either change to the mysql user, or use sudo to run the install script:

<pre class=command>x:/usr/local/mysql admin$ sudo scripts/mysql installdb --user=mysql</pre>

You'll need to fix that before you go any further on the other issues.

Jan 18, 2007 9:25 PM in response to mudchucker

What amazes me is that everyone install mysql 5.x and so far no one has offered a valid reason why they need to.

I'll start by asking you, why do you need mysql 5.x?

Ignoring the previous remarks of the user to use, you should be executing with '--user=root -p', the '-p' means it will prompt you for the root password, if you have not previous set the root users password then hitting return will work otherwise enter it when prompted.

Jan 19, 2007 4:50 AM in response to Dale Walsh

I am "reasonably" sure I tried running this as root in an earlier attempt but I can't absolutely confirm that. I can't try any suggestions until later tonight but hopefully I am wrong and one of these will work. And yes I have logged on as root and, while I have not yet, I will set a strong password for it and the annonymous users once I see the mysql db exists.

As for why I am installing 5.0, since 4.1.13 was having a problem I figured maybe a reinstall would rectify the failure to complete the mysql db install. I went ahead with 5.0 only because I figured it was supposed to be basically the same, was not "bleeding edge" (5.1) and I kinda liked the idea of having the true MySQL file locations reather than the OsX locations. I hope this will help other things like PHP work without modification. And if it failed I would still have a fallback position with the 4.1.13.

Thank you both for your observations and suggestions. I will put them to the test this evening.

Mac 512K - MacMini(Intel) Mac OS X (10.4.8)

Jan 19, 2007 3:18 PM in response to Camelot

Dale:
tried -root and failed again

Camelot:
tried sudo mysql and found a potentially bigger problem.
I couldn't remember the password (guessed twice) so went to the Workgroup Manager and could not find a mysql user. Only saw the four I set up myself. I am sure I saw it somewhere before but can't find it (in the GUI) to change the password and I am less than fluent in Unix.

Here's what the terminal shows:

x:/usr/local/mysql admin$ ls
COPYING data scripts
EXCEPTIONS-CLIENT docs share
INSTALL-BINARY include sql-bench
README lib support-files
bin man tests
configure mysql-test
x:/usr/local/mysql admin$ scripts/mysql installdb --user=root
mkdir: ./data/mysql: Permission denied
chmod: ./data/mysql: Permission denied
mkdir: ./data/test: Permission denied
chmod: ./data/test: Permission denied
chown: ./data: Operation not permitted
chown: ./data/mysql: Permission denied
chown: ./data/test: Permission denied
Installing all prepared tables
070119 17:40:07 [Warning] Can't create test file /usr/local/mysql-standard-5.0.27-osx10.4-powerpc/data/x.lower-test
070119 17:40:07 [Warning] Can't create test file /usr/local/mysql-standard-5.0.27-osx10.4-powerpc/data/x.lower-test
./bin/mysqld: Can't change dir to '/usr/local/mysql-standard-5.0.27-osx10.4-powerpc/data/' (Errcode: 13)
070119 17:40:07 [ERROR] Aborting

070119 17:40:07 [Note] ./bin/mysqld: Shutdown complete

cat: stdin: Bad file descriptor
Installation of system tables failed!

Examine the logs in ./data for more information.
You can also try to start the mysqld daemon with:
./bin/mysqld --skip-grant &
You can use the command line tool
./bin/mysql to connect to the mysql
database and look at the grant tables:

shell> ./bin/mysql -u root mysql
mysql> show tables

Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in ./data that may be helpful.

The latest information about MySQL is available on the web at
http://www.mysql.com
Please consult the MySQL manual section: 'Problems running mysql installdb',
and the manual section that describes problems on your OS.
Another information source is the MySQL email archive.
Please check all of the above before mailing us!
And if you do mail us, you MUST use the ./bin/mysqlbug script!
x:/usr/local/mysql admin$ scripts/mysql installdb --user=root -p
mkdir: ./data/mysql: Permission denied
chmod: ./data/mysql: Permission denied
mkdir: ./data/test: Permission denied
chmod: ./data/test: Permission denied
chown: ./data: Operation not permitted
chown: ./data/mysql: Permission denied
chown: ./data/test: Permission denied
Installing all prepared tables
070119 17:42:12 [ERROR] ./bin/mysqld: unknown option '-p'

cat: stdin: Bad file descriptor
Installation of system tables failed!

Examine the logs in ./data for more information.
You can also try to start the mysqld daemon with:
./bin/mysqld --skip-grant &
You can use the command line tool
./bin/mysql to connect to the mysql
database and look at the grant tables:

shell> ./bin/mysql -u root mysql
mysql> show tables

Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in ./data that may be helpful.

The latest information about MySQL is available on the web at
http://www.mysql.com
Please consult the MySQL manual section: 'Problems running mysql installdb',
and the manual section that describes problems on your OS.
Another information source is the MySQL email archive.
Please check all of the above before mailing us!
And if you do mail us, you MUST use the ./bin/mysqlbug script!
x:/usr/local/mysql admin$ sudo scripts/mysql installdb --user=mysql
Password:
Sorry, try again.
Password:
sudo: 1 incorrect password attempt
x:/usr/local/mysql admin$ sudo scripts/mysql installdb --user=mysql


Mac 512K - MacMini(Intel)

Jan 20, 2007 5:21 PM in response to mudchucker

I just rane these commands and had no issues: (you can copy paste them one at a time)<hr><pre>su; # become root
cd /usr/local/mysql
export PATH="/usr/local/mysql/bin:/usr/local/mysql/sbin:$PATH"
scripts/mysql installdb --user=root</pre><hr>
If this doesn't work for you then you have something else wrong (this wouldn't suprise me).

-- Dale

B&W G3 400 ~ Dual 1GHz G4 ~ Dual 2GHz G5 ~ Dual 3GHz MacPro Mac OS X (10.4.8)

Jan 21, 2007 8:28 AM in response to Dale Walsh

Guess there must be something else wrong.

I ran the commands you gave. "Something" happend and it looks encouraging. I made several attempts to start it and I believe finally succeded. BUT I can't log in or get version or look at the databases to verify.

Sorry for the verbose logging .......

Last login: Sat Jan 20 22:37:44 on console
Welcome to Darwin!
x:~ admin$ su; # become root
Password:
su: Sorry
x:~ admin$ su; # become root
Password:
su: Sorry
x:~ admin$ su; # become root
Password:
x:/Users/admin root# cd /usr/local/mysql
x:/usr/local/mysql root# export PATH="/usr/local/mysql/bin:/usr/local/mysql/sbin:$PATH"
x:/usr/local/mysql root# scripts/mysql installdb --user=root
Installing all prepared tables
070120 22:42:32 [Warning] Setting lower case_tablenames=2 because file system for /usr/local/mysql-standard-5.0.27-osx10.4-powerpc/data/ is case insensitive
070120 22:42:32 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when this MySQL server acts as a master and has his hostname changed!! Please use '--log-bin=x-bin' to avoid this problem.
Fill help tables
070120 22:42:32 [Warning] Setting lower case_tablenames=2 because file system for /usr/local/mysql-standard-5.0.27-osx10.4-powerpc/data/ is case insensitive
070120 22:42:32 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when this MySQL server acts as a master and has his hostname changed!! Please use '--log-bin=x-bin' to avoid this problem.

To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h x.local password 'new-password'
See the manual for more instructions.

NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run
the ./bin/mysql fix_privilegetables. Otherwise you will not be
able to use the new GRANT command!

You can start the MySQL daemon with:
cd . ; ./bin/mysqld_safe &

You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests

Please report any problems with the ./bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
x:/usr/local/mysql root#

~~~~~~~~~~~~~~~~~~~~~~~~~~


x:/ admin$ cd . ; ./bin/mysqld_safe &
[1] 24346
x:/ admin$ -bash: ./bin/mysqld_safe: No such file or directory

[1]+ Exit 127 ./bin/mysqld_safe
x:/ admin$

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Last login: Sat Jan 20 22:37:44 on console
Welcome to Darwin!
x:~ admin$ su; # become root
Password:
su: Sorry
x:~ admin$ su; # become root
Password:
su: Sorry
x:~ admin$ su; # become root
Password:
x:/Users/admin root# cd /usr/local/mysql
x:/usr/local/mysql root# export PATH="/usr/local/mysql/bin:/usr/local/mysql/sbin:$PATH"
x:/usr/local/mysql root# scripts/mysql installdb --user=root
Installing all prepared tables
070120 22:42:32 [Warning] Setting lower case_tablenames=2 because file system for /usr/local/mysql-standard-5.0.27-osx10.4-powerpc/data/ is case insensitive
070120 22:42:32 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when this MySQL server acts as a master and has his hostname changed!! Please use '--log-bin=x-bin' to avoid this problem.
Fill help tables
070120 22:42:32 [Warning] Setting lower case_tablenames=2 because file system for /usr/local/mysql-standard-5.0.27-osx10.4-powerpc/data/ is case insensitive
070120 22:42:32 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when this MySQL server acts as a master and has his hostname changed!! Please use '--log-bin=x-bin' to avoid this problem.

To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin -u root -h x.local password 'new-password'
See the manual for more instructions.

NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run
the ./bin/mysql fix_privilegetables. Otherwise you will not be
able to use the new GRANT command!

You can start the MySQL daemon with:
cd . ; ./bin/mysqld_safe &

You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; perl run-all-tests

Please report any problems with the ./bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
x:/usr/local/mysql root# exit
exit
x:~ admin$ ls
Desktop Library Music Public mysqlaccess.log
Documents Movies Pictures Sites
x:~ admin$ cd /usr/local/mysql
x:/usr/local/mysql admin$ ls
COPYING data scripts
EXCEPTIONS-CLIENT docs share
INSTALL-BINARY include sql-bench
README lib support-files
bin man tests
configure mysql-test
x:/usr/local/mysql admin$ Last login: Sat Jan 20 22:37:44 on console
admin console x.local Sat Jan 20 22:37 still logged in
dem console x.local Sat Jan 20 13:04 - 15:26 (02:22)
admin console x.local Sat Jan 20 11:00 - 13:04 (02:04)
admin console x.local Fri Jan 19 17:35 - 00:49 (07:13)
admin console x.local Fri Jan 19 17:33 - 17:34 (00:00)
admin console x.local Thu Jan 18 18:42 - 21:47 (03:05)
admin console x.local Wed Jan 17 20:26 - 20:32 (00:05)
admin console x.local Wed Jan 17 18:31 - 19:38 (01:07)
admin console x.local Wed Jan 17 17:40 - 18:01 (00:20)
admin console x.local Tue Jan 16 22:21 - 22:24 (00:02)
admin console x.local Tue Jan 16 21:55 - 21:58 (00:02)
dem console x.local Tue Jan 16 21:54 - 21:55 (00:00)
admin console x.local Tue Jan 16 18:44 - 19:17 (00:33)
dem console x.local Tue Jan 16 18:43 - 18:44 (00:00)
admin console x.local Mon Jan 15 13:28 - 13:45 (00:17)
dem console x.local Mon Jan 15 10:56 - 13:27 (02:31)
admin console x.local Thu Jan 11 22:02 - 10:56 (3+12:53)
admin console x.local Thu Jan 11 18:51 - 19:05 (00:13)

wtmp begins Thu Jan 11 18:47
x:/usr/local/mysql admin$ Welcome to Darwin!
-bash: Welcome: command not found
x:/usr/local/mysql admin$ x:~ admin$ su; # become root
-bash: x:~: command not found
x:/usr/local/mysql admin$ Password:
-bash: Password:: command not found
x:/usr/local/mysql admin$ su: Sorry
-bash: su:: command not found
x:/usr/local/mysql admin$ x:~ admin$ su; # become root
-bash: x:~: command not found
x:/usr/local/mysql admin$ Password:
-bash: Password:: command not found
x:/usr/local/mysql admin$ su: Sorry
-bash: su:: command not found
x:/usr/local/mysql admin$ x:~ admin$ su; # become root
-bash: x:~: command not found
x:/usr/local/mysql admin$ Password:
-bash: Password:: command not found
x:/usr/local/mysql admin$ x:/Users/admin root# cd /usr/local/mysql
-bash: x:/Users/admin: No such file or directory
x:/usr/local/mysql admin$ x:/usr/local/mysql root# export PATH="/usr/local/mysql/bin:/usr/local/mysql/sbin:$PATH"
-bash: x:/usr/local/mysql: No such file or directory
x:/usr/local/mysql admin$ x:/usr/local/mysql root# scripts/mysql installdb --user=root
-bash: x:/usr/local/mysql: No such file or directory
x:/usr/local/mysql admin$ Installing all prepared tables
-bash: Installing: command not found
x:/usr/local/mysql admin$ 070120 22:42:32 [Warning] Setting lower case_tablenames=2 because file system for /usr/local/mysql-standard-5.0.27-osx10.4-powerpc/data/ is case insensitive
-bash: 070120: command not found
x:/usr/local/mysql admin$ 070120 22:42:32 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when this MySQL server acts as a master and has his hostname changed!! Please use '--log-bin=x-bin' to avoid this problem.
070120 22:42:32 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when this MySQL server acts as a master and has his hostname changed070120 22:42:32 [Warning] Setting lower case_tablenames=2 because file system for /usr/local/mysql-standard-5.0.27-osx10.4-powerpc/data/ is case insensitive Please use '--log-bin=x-bin' to avoid this problem.
-bash: 070120: command not found
-bash: so: command not found
x:/usr/local/mysql admin$ Fill help tables
-bash: Fill: command not found
x:/usr/local/mysql admin$ 070120 22:42:32 [Warning] Setting lower case_tablenames=2 because file system for /usr/local/mysql-standard-5.0.27-osx10.4-powerpc/data/ is case insensitive
-bash: 070120: command not found
x:/usr/local/mysql admin$ 070120 22:42:32 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when this MySQL server acts as a master and has his hostname changed!! Please use '--log-bin=x-bin' to avoid this problem.
070120 22:42:32 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when this MySQL server acts as a master and has his hostname changed070120 22:42:32 [Warning] Setting lower case_tablenames=2 because file system for /usr/local/mysql-standard-5.0.27-osx10.4-powerpc/data/ is case insensitive Please use '--log-bin=x-bin' to avoid this problem.
-bash: 070120: command not found
-bash: so: command not found
x:/usr/local/mysql admin$
x:/usr/local/mysql admin$ To start mysqld at boot time you have to copy support-files/mysql.server
-bash: To: command not found
x:/usr/local/mysql admin$ to the right place for your system
-bash: to: command not found
x:/usr/local/mysql admin$
x:/usr/local/mysql admin$ PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
-bash: PLEASE: command not found
x:/usr/local/mysql admin$ To do so, start the server, then issue the following commands:
-bash: To: command not found
x:/usr/local/mysql admin$ ./bin/mysqladmin -u root password 'new-password'
./bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/mysql/mysql.sock' exists!
x:/usr/local/mysql admin$ ./bin/mysqladmin -u root -h x.local password 'new-password'
./bin/mysqladmin: connect to server at 'x.local' failed
error: 'Lost connection to MySQL server during query'
x:/usr/local/mysql admin$ See the manual for more instructions.
-bash: See: command not found
x:/usr/local/mysql admin$
x:/usr/local/mysql admin$ NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run
-bash: =: No such file or directory
x:/usr/local/mysql admin$ the ./bin/mysql fix_privilegetables. Otherwise you will not be
-bash: the: command not found
x:/usr/local/mysql admin$ able to use the new GRANT command!
-bash: able: command not found
x:/usr/local/mysql admin$
x:/usr/local/mysql admin$ You can start the MySQL daemon with:
-bash: You: command not found
x:/usr/local/mysql admin$ cd . ; ./bin/mysqld_safe &
[1] 23818
x:/usr/local/mysql admin$
x:/usr/local/mysql admin$ You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
-bash: You: command not found
x:/usr/local/mysql admin$ cd sql-bench ; perl run-all-tests
Can't locate DBI.pm in @INC (@INC contains: /System/Library/Perl/5.8.6/darwin-thread-multi-2level /System/Library/Perl/5.8.6 /Library/Perl/5.8.6/darwin-thread-multi-2level /Library/Perl/5.8.6 /Library/Perl /Network/Library/Perl/5.8.6/darwin-thread-multi-2level /Network/Library/Perl/5.8.6 /Network/Library/Perl /System/Library/Perl/Extras/5.8.6/darwin-thread-multi-2level /System/Library/Perl/Extras/5.8.6 /Library/Perl/5.8.1 .) at run-all-tests line 36.
BEGIN failed--compilation aborted at run-all-tests line 36.
x:/usr/local/mysql/sql-bench admin$
x:/usr/local/mysql/sql-bench admin$ Please report any problems with the ./bin/mysqlbug script!
-bash: Please: command not found
x:/usr/local/mysql/sql-bench admin$
x:/usr/local/mysql/sql-bench admin$ The latest information about MySQL is available on the web at
-bash: The: command not found
x:/usr/local/mysql/sql-bench admin$ http://www.mysql.com
-bash: http://www.mysql.com: No such file or directory
x:/usr/local/mysql/sql-bench admin$ Support MySQL by buying support/licenses at http://shop.mysql.com
-bash: Support: command not found
x:/usr/local/mysql/sql-bench admin$ x:/usr/local/mysql root# touch: /usr/local/mysql/data/x.local.err: Permission denied
chown: /usr/local/mysql/data/x.local.err: Permission denied
Starting mysqld daemon with databases from /usr/local/mysql/data
./bin/mysqld_safe: line 379: /usr/local/mysql/data/x.local.err: Permission denied
rm: /usr/local/mysql/data/x.local.pid: Permission denied
./bin/mysqld_safe: line 1: /usr/local/mysql/data/x.local.err: Permission denied
STOPPING server from pid file /usr/local/mysql/data/x.local.pid
tee: /usr/local/mysql/data/x.local.err: Permission denied
070120 22:50:33 mysqld ended
tee: /usr/local/mysql/data/x.local.err: Permission denied


-bash: x:/usr/local/mysql: No such file or directory
[1]+ Exit 1 ./bin/mysqld_safe (wd: /usr/local/mysql)
(wd now: /usr/local/mysql/sql-bench)
x:/usr/local/mysql/sql-bench admin$ ls
ChangeLog graph-compare-results test-ATIS
Comments innotest1 test-alter-table
Data innotest1a test-big-tables
README innotest1b test-connect
TODO innotest2 test-create
bench-count-distinct innotest2a test-insert
bench-init.pl innotest2b test-select
compare-results limits test-transactions
copy-db run-all-tests test-wisconsin
crash-me server-cfg
x:/usr/local/mysql/sql-bench admin$ bin/mysqlshow
-bash: bin/mysqlshow: No such file or directory
x:/usr/local/mysql/sql-bench admin$ bin/mysqladmin version
-bash: bin/mysqladmin: No such file or directory
x:/usr/local/mysql/sql-bench admin$ ls
ChangeLog graph-compare-results test-ATIS
Comments innotest1 test-alter-table
Data innotest1a test-big-tables
README innotest1b test-connect
TODO innotest2 test-create
bench-count-distinct innotest2a test-insert
bench-init.pl innotest2b test-select
compare-results limits test-transactions
copy-db run-all-tests test-wisconsin
crash-me server-cfg
x:/usr/local/mysql/sql-bench admin$ cd ../
x:/usr/local/mysql admin$ ls
COPYING data scripts
EXCEPTIONS-CLIENT docs share
INSTALL-BINARY include sql-bench
README lib support-files
bin man tests
configure mysql-test
x:/usr/local/mysql admin$ bin/mysqladmin version
bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/mysql/mysql.sock' exists!
x:/usr/local/mysql admin$ bin/mysqlshow
bin/mysqlshow: Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)
x:/usr/local/mysql admin$ cd bin
x:/usr/local/mysql/bin admin$ ls
comp_err mysql_zap
make sharedlibdistribution mysqlaccess
make win_bindist mysqlaccess.conf
make win_srcdistribution mysqladmin
msql2mysql mysqlbinlog
my printdefaults mysqlbug
myisam_ftdump mysqlcheck
myisamchk mysqld
myisamlog mysqld_multi
myisampack mysqld_safe
mysql mysqldump
mysql clienttest mysqldumpslow
mysql_config mysqlhotcopy
mysql convert_tableformat mysqlimport
mysql create_systemtables mysqlmanager
mysql explainlog mysqlshow
mysql findrows mysqltest
mysql fixextensions mysqltestmanager
mysql fix_privilegetables mysqltestmanager-pwgen
mysql secureinstallation mysqltestmanagerc
mysql_setpermission perror
mysql_tableinfo replace
mysql tzinfo_tosql resolve stackdump
mysql_upgrade resolveip
mysql upgradeshell safe_mysqld
mysql_waitpid
x:/usr/local/mysql/bin admin$ mysql_safe
-bash: mysql_safe: command not found
x:/usr/local/mysql/bin admin$ mysqlshow
mysqlshow: Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)
x:/usr/local/mysql/bin admin$ mysqld_safe
Starting mysqld daemon with databases from /var/mysql
STOPPING server from pid file /var/mysql/x.local.pid
070120 22:59:35 mysqld ended

x:/usr/local/mysql/bin admin$ mysqlshow
mysqlshow: Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)
x:/usr/local/mysql/bin admin$ mysqld_safe -u mysql
Starting mysqld daemon with databases from /var/mysql
STOPPING server from pid file /var/mysql/x.local.pid
070120 23:00:48 mysqld ended

x:/usr/local/mysql/bin admin$ mysqladmin version
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/mysql/mysql.sock' exists!
x:/usr/local/mysql/bin admin$ mysqladmin version
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/mysql/mysql.sock' exists!
x:/usr/local/mysql/bin admin$ mysqld_safe --user=mysql &
[1] 24146
x:/usr/local/mysql/bin admin$ Starting mysqld daemon with databases from /var/mysql
STOPPING server from pid file /var/mysql/x.local.pid
070120 23:05:05 mysqld ended


[1]+ Done mysqld_safe --user=mysql
x:/usr/local/mysql/bin admin$ mysqld_safe --user=root
chown: /var/mysql/x.local.err: Operation not permitted
Starting mysqld daemon with databases from /var/mysql
STOPPING server from pid file /var/mysql/x.local.pid
070120 23:05:43 mysqld ended

x:/usr/local/mysql/bin admin$ mysqladmin version
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/mysql/mysql.sock' exists!
x:/usr/local/mysql/bin admin$ mysqladmin versioncd /
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/mysql/mysql.sock' exists!
x:/usr/local/mysql/bin admin$ ls
comp_err mysql_zap
make sharedlibdistribution mysqlaccess
make win_bindist mysqlaccess.conf
make win_srcdistribution mysqladmin
msql2mysql mysqlbinlog
my printdefaults mysqlbug
myisam_ftdump mysqlcheck
myisamchk mysqld
myisamlog mysqld_multi
myisampack mysqld_safe
mysql mysqldump
mysql clienttest mysqldumpslow
mysql_config mysqlhotcopy
mysql convert_tableformat mysqlimport
mysql create_systemtables mysqlmanager
mysql explainlog mysqlshow
mysql findrows mysqltest
mysql fixextensions mysqltestmanager
mysql fix_privilegetables mysqltestmanager-pwgen
mysql secureinstallation mysqltestmanagerc
mysql_setpermission perror
mysql_tableinfo replace
mysql tzinfo_tosql resolve stackdump
mysql_upgrade resolveip
mysql upgradeshell safe_mysqld
mysql_waitpid
x:/usr/local/mysql/bin admin$ cd /
x:/ admin$ ls
Applications Network automount mach sbin
Desktop DB Shared Items bin mach.sym tmp
Desktop DF System cores mach_kernel usr
Groups Users dev opt var
Library Volumes etc private
x:/ admin$ cd . ; ./bin/mysqld_safe &
[1] 24346
x:/ admin$ -bash: ./bin/mysqld_safe: No such file or directory

[1]+ Exit 127 ./bin/mysqld_safe
x:/ admin$ mysqladmin version
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/mysql/mysql.sock' exists!
x:/ admin$ /usr/local/mysql/bin/mysqladmin version
/usr/local/mysql/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/mysql/mysql.sock' exists!
x:/ admin$ cd /usr/local/mysql/bin
x:/usr/local/mysql/bin admin$ ls
comp_err mysql_zap
make sharedlibdistribution mysqlaccess
make win_bindist mysqlaccess.conf
make win_srcdistribution mysqladmin
msql2mysql mysqlbinlog
my printdefaults mysqlbug
myisam_ftdump mysqlcheck
myisamchk mysqld
myisamlog mysqld_multi
myisampack mysqld_safe
mysql mysqldump
mysql clienttest mysqldumpslow
mysql_config mysqlhotcopy
mysql convert_tableformat mysqlimport
mysql create_systemtables mysqlmanager
mysql explainlog mysqlshow
mysql findrows mysqltest
mysql fixextensions mysqltestmanager
mysql fix_privilegetables mysqltestmanager-pwgen
mysql secureinstallation mysqltestmanagerc
mysql_setpermission perror
mysql_tableinfo replace
mysql tzinfo_tosql resolve stackdump
mysql_upgrade resolveip
mysql upgradeshell safe_mysqld
mysql_waitpid
x:/usr/local/mysql/bin admin$ mysqladmin version
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/mysql/mysql.sock' exists!
x:/usr/local/mysql/bin admin$ mysqld_safe -u root
Starting mysqld daemon with databases from /var/mysql
STOPPING server from pid file /var/mysql/x.local.pid
070120 23:17:57 mysqld ended

x:/usr/local/mysql/bin admin$

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Last login: Sun Jan 21 11:00:39 on console
Welcome to Darwin!
x:~ admin$ sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
Password:
x:~ admin$ cd /usr/local/mysql
x:/usr/local/mysql admin$ bin/mysqladmin version
bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/mysql/mysql.sock' exists!
x:/usr/local/mysql admin$ sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
Password:
Starting MySQL database server
x:/usr/local/mysql admin$ bin/mysqladmin version
bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/var/mysql/mysql.sock' exists!
x:/usr/local/mysql admin$ ls
COPYING data scripts
EXCEPTIONS-CLIENT docs share
INSTALL-BINARY include sql-bench
README lib support-files
bin man tests
configure mysql-test
x:/usr/local/mysql admin$ mysql -h localhost -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)
x:/usr/local/mysql admin$


I hope I am not just being stupid, but now things I thought I understood are not working or I have just gotten totally confused.

I VERY MUCH appreciate all of your help in this.

Jan 22, 2007 8:35 AM in response to Dale Walsh

Yes (the following is shown in the previous post.
Neither user=mysql nor user=root worked.

x:/usr/local/mysql/bin admin$ mysqld_safe --user=mysql &
[1] 24146
x:/usr/local/mysql/bin admin$ Starting mysqld daemon with databases from /var/mysql
STOPPING server from pid file /var/mysql/x.local.pid
070120 23:05:05 mysqld ended

[1]+ Done mysqld_safe --user=mysql


x:/usr/local/mysql/bin admin$ mysqld_safe --user=root
chown: /var/mysql/x.local.err: Operation not permitted
Starting mysqld daemon with databases from /var/mysql
STOPPING server from pid file /var/mysql/x.local.pid
070120 23:05:43 mysqld ended

Jan 25, 2007 12:24 PM in response to mudchucker

When issues are at hand you should be root and not admin, sudo doesn't cut it.

Are you 100% certain that your mysql5 has it's sockect at /var/mysql?


If it is, here's what you do now:
<pre>turn on Apple Remote Desltop in shareing preferences.

check a user in the list and check all options for this user.

log out then in as root.

verify the user is still selected in Apple Remote Desktop.</pre>
send me an e-mail with the IP, usrname and password, I'll come and have a look at what the issue is and see if we can resolve it.

NOTE:<pre> This is my final offer to help you resolve this.

I have little patience left in this matter so any resistance
will be a sign of your lack of interest to resolve this matter.
and my offer will be withdrawn.

I have no time to explain what will occur during the ARD session
so you will have to trust that my intentions are honorable.

If you have issues with this plan of attack then I suggest you
do yourself a favor and hire someone to resolve your problem
since it is clear you lack the skills to resolve it on your own.</pre>

Feb 13, 2007 2:12 AM in response to mudchucker

Hello topic readers:

I was wondering if mudchucker ever got mySQL going?

I have had the default mySQL working (not the 5.0), as per instructions in the MySQL section of the Command Linev10.4.pdf documentation, however, I mucked things up tring to change the datadir to a different Volume, just so my data wouldn't be on same volume as tiger server 10.4, and am looking for a thread to help me out.

To contribute to this thread: when Camelot advised using sudo, and mudchucker forgot the password, he began looking in Workgroup Manager for the mysql user, which he couldn't find. First off, he should be looking for his own password, not a password for mysql, and he must have already known his password in order to have logged in, and this password should work, provided his user account has administrative (sudo) priveledges. Secondly, had he tried to use Workgroup Manager to create a user named mysql, Workgroup Manger would have responded with a "name already in use" error, as the user is already created by default.

My advise to mudchucker is to go back and try sudo with his own password.

In my situation, I tried to change the default location of the databases made by mySQL by using the command:

sudo /usr/bin/mysqlinstalldb --datadir=\Volumes\mydata\mysql --user=mysql -u mysql

and it sets up the test and the mysql databases on the target volume.

I also added the following line to \etc\my.cnf :

datadir = \Volumes\mydata\mysql

However, here's what happens when I try to start:

www% sudo /usr/bin/mysqld_safe --skip-grant-tables --skip-networking &
[1] 1081
www% Starting mysqld daemon with databases from /Volumes/mydata/mysql
STOPPING server from pid file /Volumes/mydata/mysql/www.mydomain.com.pid
070213 01:47:31 mysqld ended


Is there anything else that needs to be done to change the default location of the data directory? Do I need to change the socket to that location too?

--another mySQL noob

Feb 13, 2007 1:31 PM in response to Everett Fuller

A followup on my last post:

It was 1 am in the morning when I made my last post, and I wrote some slashes backwords in the paths of my --datadir= options... however, I actually know which way the slashes go, and typed them the correct way in the terminal, and that was not the source of my errors.

After more dabbling through the wee hours, I got mysqld running with user=root, and it is using the new data diretory on my separate data volume! I can connect to mysql monitor and create databases, grant priveledges, add tables, etc.

However, adding MYSQL=-YES- to /etc/hostconfig, doesn't seem to be enough to make it startup mysql automatically on system boot up...

And whenever I try to start mysqld with user=mysql, I still get the "STOPPING server from pid file" message...

I made my new datadir owned by root:wheel, and set permissions to 0700, because that was what the permissions were for the default data dir.

However, since I can grant priveledges as root, anyways, I know it is not deleting my grant table, so I have a different situation than mudchucker, and if I don't work it out soon, I will start new thread in command-line discussion...

Dual G4 colocated xserve Mac OS X (10.4.8)

Feb 14, 2007 8:41 AM in response to Everett Fuller

worked it out:

after the command sudo chown -R mysql:wheel /var/mysql , I was able to start mySQL with --user=mysql. Yea. I am guessing what was happening is that the socket is opened up by the user that we are setting to own the mySQL process, when we give the option user=mysql; and since the socket directory was set to /var/mysql in /etc/my.cnf, the user mysql has to have permission to write to the directory where the socket is going to bind. So by changing the owner to mysql, and leaving the group set to wheel, mySQL is up and running. By adding datadir=/Volumes/datavol/datadir/ to /etc/my.cnf, and to the --datadir=/Volumes/datavol/datadir option when running /usr/bin/mysqlinstalldb, I am able to use a separate data volume for the mysql databases, which, in my opinion, makes backup easier, and keeps my data safe from software updates that might crash the os volume.

In mudchuckers situation, I suspect that if he runs the command sudo pathtohismysqlbin/mysqlinstalldb --user=mysql -u mysql, and then enters his regular password for the admin user account that he is logged in with,he should get the proper tables set up, and he should then be able to start mysqld with sudo pathtohismysqlbin/mysqld_safe --user=mysql &

If he has not deleted the default mysql binaries from apple's installation, having both mysql4 and mysql5 on the system, shouldn't be a problem, as long as he uses the complete path to his installation when issuing commands, i.e., /hispathtohismysqlbin/mysqlcommand;

Another route mudchucker could take would be to delete his installation of mysql5, and use the builtin mysql4 system which, if he is physically present on the local server, has a graphical front end, and bypasses the command-line all together; I think the gui is called mySQL Manager, and it is in /Applications/Server

hope he already has it worked out

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

MySQL installations fail to create grant table

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.