General
cancel
Showing results for 
Search instead for 
Did you mean: 

mysql and hpux installation issues

BenIsCool
Frequent Advisor

mysql and hpux installation issues

Hello,

Has anyone installed mysql on hpux 11.11?

I have downloaded a recent release from mysql in depot format and it installs fine.

However, when I execute the install db script to set up the tables, it errors out. I suspect a permissions issue because i am specifying user mysql. If i specify user root it runs fine. But of course I don't want my tables to be created under root.

And advise?

Thanks
13 REPLIES
Steven E. Protter
Exalted Contributor

Re: mysql and hpux installation issues

Shalom,

Make the location of the tables, which is defined in my.cnf owned by user mysql

Provide the exact error codes for further assistance.

In answer to your question, yes I have installed it and used it.

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
BenIsCool
Frequent Advisor

Re: mysql and hpux installation issues

Hello,

Thank you for your reply.
I cannot find the file you mention:
root-doc# find / -name my.cnf
root-doc#

Here is the error:
root-doc# scripts/mysql_install_db --user=mysql

Installing MySQL system tables...
ERROR: 1005 Can't create table 'db' (errno: 13)
070827 10:37:54 [ERROR] Aborting
070827 10:37:54 [Note] ./bin/mysqld: Shutdown complete
Installation of system tables failed!
Examine the logs in ./data for more information.
You can try to start the mysqld daemon with:
./bin/mysqld --skip-grant &
and 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.


Thank you
V. Nyga
Honored Contributor

Re: mysql and hpux installation issues

Hi,

what's when you start the script when you're logged in as user mysql and with the option --no-defaults ?

Volkmar
*** Say 'Thanks' with Kudos ***
BenIsCool
Frequent Advisor

Re: mysql and hpux installation issues

Thanks for the response.

Same results:

$ whoami
mysql
$ pwd
/usr/local/mysql
$ scripts/mysql_install_db --no-defaults

Installing MySQL system tables...

ERROR: 1005 Can't create table 'db' (errno: 13)
070828 9:06:30 [ERROR] Aborting

070828 9:06:30 [Note] ./bin/mysqld: Shutdown complete

Installation of system tables failed!
V. Nyga
Honored Contributor

Re: mysql and hpux installation issues

Hmm - where should db be created - directory data?
Can you give us a 'll' of /usr/local/mysql ?

V.

*** Say 'Thanks' with Kudos ***
BenIsCool
Frequent Advisor

Re: mysql and hpux installation issues

root-doc# whoami
root
root-doc# pwd
/usr/local/mysql
root-doc# ll
total 272
-rwxrwxrwx 1 mysql mysql 19071 Apr 26 13:08 COPYING
-rwxrwxrwx 1 mysql mysql 5139 Apr 26 13:08 EXCEPTIONS-CLIENT
-rwxrwxrwx 1 mysql mysql 8482 Apr 26 16:23 INSTALL-BINARY
-rwxrwxrwx 1 mysql mysql 1410 Apr 26 13:08 README
drwxrwxrwx 2 mysql mysql 8192 Aug 24 07:34 bin
-rwxrwxrwx 1 mysql mysql 801 Apr 26 16:53 configure
drwxrwxrwx 4 mysql mysql 8192 Aug 28 09:06 data
drwxrwxrwx 2 mysql mysql 96 Aug 24 07:34 docs
drwxrwxrwx 3 mysql mysql 8192 Aug 24 07:34 include
drwxrwxrwx 2 mysql mysql 8192 Aug 24 07:34 lib
drwxrwxrwx 4 mysql mysql 96 Aug 24 07:34 man
drwxrwxrwx 8 mysql mysql 8192 Aug 24 07:34 mysql-test
drwxrwxrwx 2 mysql mysql 96 Aug 24 07:34 scripts
drwxrwxrwx 3 mysql mysql 8192 Aug 24 07:34 share
drwxrwxrwx 5 mysql mysql 8192 Aug 24 07:34 sql-bench
drwxrwxrwx 2 mysql mysql 8192 Aug 24 07:34 support-files
drwxrwxrwx 2 mysql mysql 8192 Aug 24 07:34 tests
root-doc#
V. Nyga
Honored Contributor

Re: mysql and hpux installation issues

Hi again,

run the file 'configure' in your mysql directory.
What's the result?

V.
*** Say 'Thanks' with Kudos ***
BenIsCool
Frequent Advisor

Re: mysql and hpux installation issues

Thanks for the reply.

This is the mysql hp depot version but I ran the configure anyway as you suggested.
But, now there is a problem because it did the work as root automatically.

Can we undo this or should I restore a sys image and try again as user mysql?



root-doc# whoami
root
root-doc# pwd
/usr/local/mysql
root-doc# ./configure
NOTE: This is a MySQL binary distribution. It's ready to run, you don't
need to configure it!

To help you a bit, I am now going to create the needed MySQL databases
and start the MySQL server for you. If you run into any trouble, please
consult the MySQL manual, that you can find in the Docs directory.

Installing MySQL system tables...

OK
Filling help tables...
OK

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 doc password 'new-password'
See the manual for more instructions.
You can start the MySQL daemon with:
cd . ; ./bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl
V. Nyga
Honored Contributor

Re: mysql and hpux installation issues

Well - I've installed mysql in 2005, so can't remember if I've done it as root or as mysql.
You've already tested it as root and it worked ...
Can you see what the script has done?
Any tables in data?
I have only the data directory assigned to mysql anything else is owned by root.

If you don't waste to much time, you can restore the system and try it as mysql again.
But maybe you have to run it as root ...

Volkmar
*** Say 'Thanks' with Kudos ***
BenIsCool
Frequent Advisor

Re: mysql and hpux installation issues

I checked the data directory and information was created and owned by root/sys.

Just out of curiosity, i rm -rf'ed the data directory. I then su'ed to mysql and ran the configure script again. This time it completed 'succesfully'. There is now information in the data folder and it is all owned by mysql. However, as mysql, the configure script failed to start mysqld (where root was able to).

I don't know if the data created is valid and will work: I still have testing to do. But in the mean time, should user mysql be able to run mysqld?

Thanks
V. Nyga
Honored Contributor

Re: mysql and hpux installation issues

yes - I'm running it this way.

V.
*** Say 'Thanks' with Kudos ***
Steven E. Protter
Exalted Contributor

Re: mysql and hpux installation issues

Shalom,

You can not run mysql database owned by root.

I believe mysqld uses shares memory and having that memory owned by root makes it inaccessible by other users.

This problem seems totally connected to permissions and ownership, which needs to be revised.

These articles focus on Linux, however mysql works almost exactly the same way after depot install on hpux. Don't go back and try a tar based install.
http://dev.mysql.com/tech-resources/articles/mysql_intro.html

http://forum.mamboserver.com/showthread.php?t=67525

http://www.debianhelp.co.uk/mysql.htm

Don't confuse the root mysql password with the root user. They have nothing to do with one and other.

Creating tables with MYSQL user root is not a problem at all, though it is more powerful and may present a security hazard.

Get file permissions right before you begin.

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
BenIsCool
Frequent Advisor

Re: mysql and hpux installation issues

Thank you for the links. It is useful to have such information. However, they do not seem to address the problem I am facing in this post. I have read a great deal of the information you posted above already, before coming here to ask for help.

The problem is, that after following the documents referenced, the process does not work. I understand how to install it. How to run the setup. How the start the daemon. The problem is that it does not work.

Straight from the mysql manual, for example, I run the mysql_install_db script and it does not work. Through this posting I have found that running configure might provide an alternative.

Staright from the mysql manual I run mysqld_safe but it does not work.
I realize that it is a permissions issue and that is why I am posting here for help. What am I missing? I have followed the manuals. I have searched forums. I have even chmod -R'ed the whole directory to 777. Still no luck.

Please, any advice.
Thank you.