Please help.. upgrade to Jaguar caused MySQL errors

ms_kle

Registered
:confused: Before upgrading to Jaguar, MySQL was working w/o problems. After upgrading, I get the following errors when I attempt to run this command "./mysql -u root -p" to access the database.

dyld: ./mysql Undefined symbols:
_tgetent
_tgetflag
_tgetnum
_tgetstr
_tgoto
_tputs

MySQL seems to be running because when I run "./safe_mysqld &" it activates the database, and is available to my PHP apps. I need to have command line access to the database, and can't figure out what these errors mean.

Please help... :confused:

Thanks in advance boys!
 
This has been known to happen.
It happened to a friend of mine and he fixed it. I can't remember exactly how, but i believe you can upgrade some things to help.
 
Help.... :(

I tried reinstalling, and I got the same errors while trying to run the "make" command. I'm going to look for a newer version now. (I was using MySQL 3.23.42)

The errors were:
dyld: ./mysql Undefined symbols:
_tgetent
_tgetflag
_tgetnum
_tgetstr
_tgoto
_tputs


Please help....
 
You need the Jaguar version of MySQL (even though its 3.23.51), I had the same problem. Downloaded the Jag version and all worked first time.

I did "tar" my databases and store them temporarily in another place, upgradede and then "tar"ed them back into place and everythiing works ok.

In fact it was somebody else on this bulletin board that fixed me up, just "passing the good luck on".
 
Thanks for the reply, Hypocampers. I wish that I had read it before I did the following...

I'm an idiot! Instead of performing an upgrade, I backed up my databases using the "mysqldump --All" command and deleted my old MySQL directory. I then installed MySQL 3.23.51. All worked well during install, but when I go to fire up mysql, I get the following errors in the error log:

021020 18:32:42 mysqld started
021020 18:32:43 /usr/local/home/mysql/libexec/mysqld: Can't create/write to file '/usr/local/home/mysql/var/Mymac.local..pid' (Errcode: 13)
021020 18:32:43 /usr/local/home/mysql/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
021020 18:32:43 /usr/local/home/mysql/libexec/mysqld: Error on delete of '/usr/local/home/mysql/var/Mymac.local..pid' (Errcode: 13)
021020 18:32:43 mysqld ended

I think that by deleteing instead of upgrading, I screwed up the permissions... yikes! Can anyone help? Or am I going to have to wipe my system and start from scratch?
 
There are a few ways to proceed:

What I did probably a bit radical:

1. From a terminal (as root) cd /usr/local/mysql) or wherever the distribution is and cd into "data"

2. tar cvf mydata.tar "your database" (the tasl tis the directory data under mysql
3. copy it somewhere , i.e. $HOME/data.tar

4. cd /usr/local/bin and removed all mysql and isam stuff:

rm mysql*
rm isam*

5. cd /usr/local

rm -r mysql

6. re-install mysql and go throught the install procedure (Mark Liyange, I can never spell his name, but its good).

7. The copied back my tar files into the data directory and unpacked them:

tar xvf mydata.tar

My data was safe!

What seems to happen is that mysql has some data all of its own about its security and some problems occure when UNIX gets involved as well, its a guess, but it may explain the very odd problems you get into in these situations.

I did this on a few occasions and the procedure worked for me, however i am not working on production data, where the sweat beads start to role.

You should be ok, as long as you don't delete you "data" directory.

Keep us informed, if you have major problems, the stuff we find out may be usefull to the rest of who have blown away databases.
 
I solved my problem! The problems that I was having definitely were due to permission settings. After going back to Yoshi's How-to on installing MySQL and PHP, I noticed that I didn't run the "chown" command on my MySQL directory.

So after running:
"sudo chown -R mysql /usr/local/home/mysql/*"
I was able to start the MySQL demon without errors, and access the mySQL command line without errors!

Thanks to "Hypocampers" and all who helped!

Recap of what I did and how it was solved:
-------------------------------------------------------------------------------------
Note: my MySQL is installed at /usr/local/home/mysql yours may be installed at a different location.

1)Upgraded to OSX.2 (Jaguar)
2)Noticed that MySQL worked, but I had no access to command line editor (invoked with the "./bin/mysql -u root -p" command)

Errors were:
dyld: ./mysql Undefined symbols:
_tgetent
_tgetflag
_tgetnum
_tgetstr
_tgoto
_tputs

3)Backed up databases using the "/usr/local/home/mysql/bin/mysqldump --all-databases > db_backup.sql" command.
4)Copied "db_backup.sql" file to $HOME/db_backup.sql
5)Deleted MySQL directory (from /usr/local/home/ directory I typed "rm -r mysql")
6)Installed MySQL version 3.23.53
7)Got error when I ran the "/usr/local/home/mysql-3.23.53/scripts/mysql_install_db" to install the mySQL permissions table (If you want info about this step, refer to Yoshi's PHP/mySQL How-to in the How-to forum.)

The error Read:
"Sorry, the host mymac.local. could not be looked up.
Please configure the 'hostname' command to return a correct hostname.
If you want to solve this at a later stage, restart this script with
the --force option"

8)Solved error by adding the following line to the /etc/hosts file:
127.0.0.1 Mymac.local. (substitute "Mymac" with the name of your computer)
9)Ran "/usr/local/home/mysql-3.23.53/scripts/mysql_install_db" again and got no errors.
10)Tried to start MySQL demon using "/usr/local/home/mysql/bin/safe_mysqld &" command.
11)Got the following errors in the "/usr/local/home/mysql/var/Mymac.local..err" file:

021020 18:32:42 mysqld started
021020 18:32:43 /usr/local/home/mysql/libexec/mysqld: Can't create/write to file '/usr/local/home/mysql/var/Mymac.local..pid' (Errcode: 13)
021020 18:32:43 /usr/local/home/mysql/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
021020 18:32:43 /usr/local/home/mysql/libexec/mysqld: Error on delete of '/usr/local/home/mysql/var/Mymac.local..pid' (Errcode: 13)
021020 18:32:43 mysqld ended

12)Ran the following command to set proper permissions (must be root user):
"chown -R mysql /usr/local/home/mysql/*"
13)Ran the "/usr/local/home/mysql/bin/safe_mysqld &" command again to start the demon. Got no errors.
14)Copied the "$HOME/db_backup.sql" file to "/usr/local/home/mysql/bin/db_backup.sql".
15)Ran "/usr/local/home/mysql/bin/mysql < db_backup.sql" to restore my databases. Got no errors.

16)All is back to normal! :)

Hope this step-by-step helps others who WILL face the same problems after upgrading to Jaguar. Just remember not to make the same mistakes I did!

Thanks again for everyone's help!
 
Back
Top