Operating System - HP-UX
1752782 Members
5856 Online
108789 Solutions
New Discussion юеВ

Re: problems when testing mysql daemon

 
SOLVED
Go to solution
Carol Maley
New Member

problems when testing mysql daemon

I'm trying to get mysql up for the first time on an HP-UX machine. I'm using DL4term for access. It came pre-configured with mysql 3.23.42:
bin/mysql Ver 11.15 Distrib 3.23.42, for hp-hpux11.00 (hppa2.0n).

The installation log at /opt/mysql/MySQLInstall.log tells me I can test the mysql daemon. I tested, using:
#cd /opt/mysql
#/opt/mysql/bin/safe_mysqld &
#cd sql-bench
#exec run-all-tests

and I had a slew of errors, mostly of the type:
/usr/bin/sh: Syntax error at line 1 : `{' is not matched.
/usr/bin/sh: =: not found.
/usr/bin/sh: Syntax error at line 1 : `}' is not expected.
/usr/bin/sh: Syntax error at line 1 : `}' is not expected.
/usr/bin/sh: Syntax error at line 1 : `(' is not expected.
/usr/bin/sh: Syntax error at line 1 : `}' is not expected.

Please help.
Thanks,
Carol.
10 REPLIES 10
Steven E. Protter
Exalted Contributor

Re: problems when testing mysql daemon

I do not know how you got that script on the server but it may habe been corrupted in ftp transfer or simply been delivered with a syntax error.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Carol Maley
New Member

Re: problems when testing mysql daemon

I guess that's possible, however, since it was delivered with the machine it's unlikely. Do you know of some other way I can test it?
Thanks,
Carol.
Paul Cross_1
Respected Contributor

Re: problems when testing mysql daemon

maybe run the script in debug mode, you might find something really obvious...

sh -x /opt/mysql/sql-bench/run-all-tests
Carol Maley
New Member

Re: problems when testing mysql daemon

Thanks.

This is what I got...
#sh -x /opt/mysql/sql-bench/run-all-tests

+ use DBI
/opt/mysql/sql-bench/run-all-tests[36]: use: not found.
+ =1
/opt/mysql/sql-bench/run-all-tests[38]: =1: not found.
+ @ORG_ARGV=@ARGV
/opt/mysql/sql-bench/run-all-tests[40]: @ORG_ARGV=@ARGV: not found.
/opt/mysql/sql-bench/run-all-tests[41]: Syntax error at line 41 : `(' is not exp
ected.

I'm lost. I assume there must be some configuration issue that I'm unaware of, but HP pre-configured it.

Thanks for your help.
Carol.
Steven E. Protter
Exalted Contributor

Re: problems when testing mysql daemon

I tend to disagree with you.

Try uploading or writing some sql and running it interactively.

If it works, its the issue at hand is the sql script itself. Whats on line 41 or 40?

If normal sql that you know works elsewhere(mysql) does not work then you are correct its a configuration issue.

HP pre-configured the system. They may have accidently changed the sql script while looking at it or copying code for some other use. Mistakes happen.

Good Luck,

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Carol Maley
New Member

Re: problems when testing mysql daemon

Thanks Steve, however, I cannot mysql running - period. I get:

#mysql
/usr/bin/sh: mysql: not found.
and I've just realized from the documentation that this is not supposed to happen:

#/opt/mysql/bin/safe_mysqld &
#Starting mysqld daemon with databases from /opt/mysql/var
050118 14:08:06 mysqld ended

There's supposed to be a mysql-data-directory file which I cannot find...

Thanks,
Carol.

Paul Cross_1
Respected Contributor
Solution

Re: problems when testing mysql daemon

If it is true that you don't have a mysql data directory, it sounds to me like the install did not complete. When you install mysql there is an initial script called mysql_install_db that creates the data directory, the database privileges and the test database, among other things.

Since I don't know how or where your copy of mysql was installed, I don't know where the mysql_install_db script is located, but given the above info, you will most likely find it here:

/opt/mysql/bin/mysql_install_db

otherwise you will have to dig for it. :)

-paul
Paul Cross_1
Respected Contributor

Re: problems when testing mysql daemon

PS: make sure you make a copy of your /opt/mysql directory first!
Carol Maley
New Member

Re: problems when testing mysql daemon

Thanks everyone! I can get into mysql now. I have no idea why I could not earlier, and my run-all-tests is still failing, however I'm able to show databases; show tables; create table; and select;

I'm not able to Create a Database. I get:

mysql> create database recovreimb;
ERROR 1044: Access denied for user: '@localhost' to database 'recovreimb'
I assume this is an authorization issue. Do I create a user and assign all authorities to get around this?

Thanks for your help!
Carol.