VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: SOLVED: mysql install problem  (Read 1365 times)

bad_gui

  • Member
  • *
  • Posts: 61
SOLVED: mysql install problem
« on: February 29, 2008, 05:59:23 pm »

I am trying to use mysql 5.0.45 on VL5.9 and I can't install a database.
There was already a user and group mysql so I executed the command

mysql_install_db (enter)

and there was no error message but I can't find the data dir and files
it was supposed to create

According to /usr/ports/opt/mysql/README

Quote
README for mysql 5.0.xx

REQUIREMENTS

PRE-INSTALL

POST-INSTALL
1. append /usr/lib/mysql to ld.so.conf and run ldconfig
2. run 'mysql_install_db' to build the system database
   in /var/lib/mysql
3. run 'mysql_upgrade' to add new privileges and features
   to the MySQL privilege tables if you have 4.x or 3.x
   databases
4. Set a password for the mysql root user:
   mysqladmin -u root password <mysql_root_password>

There is no /var/lib/mysql directory.  I noticed that the package doesn't
include this but I checked the slackware package mysql-5.0.51a-i486-1.tgz
and it does include some extras in /var that the VL5.9 package is missing.


Quote
/var/log/packages/mysql-5.0.45-i586-1vl59

usr/include/mysql/mysqld_error.h
usr/include/mysql/mysql_time.h
usr/include/mysql/my_alloc.h
usr/include/mysql/m_string.h
install/
install/doinst.sh
install/slack-desc
install/slack-required

Quote
tar -tvzf mysql-5.0.51a-i486-1.tgz

-rw-r--r-- root/root      2313 2008-02-15 00:49 usr/man/man1/mysql-stress-test.pl.1.gz
drwxr-xr-x root/root         0 2008-02-15 00:49 install/
-rw-r--r-- root/root       816 2008-02-15 00:49 install/slack-desc
-rw-r--r-- root/root      1505 2008-02-15 00:49 install/doinst.sh
drwxr-xr-x root/root         0 2008-02-15 00:49 var/
drwxr-xr-x root/root         0 2008-02-15 00:49 var/lib/
drwxr-x--- mysql/mysql       0 2008-02-15 00:49 var/lib/mysql/
drwxr-xr-x root/root         0 2008-02-15 00:49 var/run/
drwxr-xr-x mysql/mysql       0 2008-02-15 00:49 var/run/mysql/

Edit:
I uninstalled the version of mysql that came with VL5.9 and installed the one available for Slackware12
mysql-5.0.51a-i486-1.tgz

I no longer get database install and daemon startup errors.  These may have been due to missing
directories /var/lib/mysql and /var/run/mysql but it seems cleaner to install a new package.
« Last Edit: March 01, 2008, 10:04:31 am by bad_gui »
Logged

bad_gui

  • Member
  • *
  • Posts: 61
error message for mysql install problem
« Reply #1 on: February 29, 2008, 06:26:05 pm »

It seems to be a path problem.  mysqld is looking in /var not in /var/lib/mysql
but I don't know where to change this- was it compiled this way?

Quote
080229 21:21:19  mysqld started
nohup: ignoring input
InnoDB: The first specified data file /var/ibdata1 did not exist:
InnoDB: a new database to be created!
080229 21:21:19  InnoDB: Setting file /var/ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
080229 21:21:19  InnoDB: Log file /var/ib_logfile0 did not exist: new to be create
d
InnoDB: Setting log file /var/ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
080229 21:21:19  InnoDB: Log file /var/ib_logfile1 did not exist: new to be create
d
InnoDB: Setting log file /var/ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
080229 21:21:20  InnoDB: Started; log sequence number 0 0
080229 21:21:20 [ERROR] Fatal error: Can't open and lock privilege tables: Table '
mysql.host' doesn't exist
080229 21:21:20  mysqld ended

Logged