Sponsored Content
Full Discussion: mysqld
Operating Systems BSD mysqld Post 70894 by SoulCoder on Thursday 5th of May 2005 03:38:32 AM
Old 05-05-2005
the right way

Thanks

I will follow those steps

Smilie

Well,

I reinstall the port mysql41-server, but I have still nothing like mysql-server.sh under /usr/local/etc/rc.d/

Nevermind I follow instruction you give me

First the mysql_install_db
Code:
Lodelservoo# /usr/local/bin/mysql_install_db
Installing all prepared tables
Fill help tables

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:
/usr/local/bin/mysqladmin -u root password 'new-password'
/usr/local/bin/mysqladmin -u root -h Lodelservoo.workgroup password 'new-password'
See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr/local ; /usr/local/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 /usr/local/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 https://order.mysql.com
Lodelservoo#

Now Under /var/db/mysql there is two dir : mysql and test

I go under test and I launch mysqld_safe
Code:
Lodelservoo# /usr/local/bin/mysqld_safe --user=mysql
Starting mysqld daemon with databases from /var/db/mysql
STOPPING server from pid file /var/db/mysql/Lodelservoo.workgroup.pid
050505 13:18:22  mysqld ended

So I watch in the Lodelservoo.workgroup.err logfile
Code:
Lodelservoo# vi Lodelservoo.workgroup.err 

050505 13:18:22  mysqld started
050505 13:18:22 [ERROR] bdb:  /var/db/mysql: Permission denied
050505 13:18:22 [ERROR] bdb:  /var/db/mysql/log.0000000001: Permission denied
050505 13:18:22 [ERROR] bdb:  PANIC: Permission denied
050505 13:18:22 [ERROR] bdb:  PANIC: DB_RUNRECOVERY: Fatal error, run database recovery
050505 13:18:22 [ERROR] bdb:  fatal region error detected; run recovery
050505 13:18:22 [ERROR] bdb:  /var/db/mysql: Permission denied
050505 13:18:22  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
050505 13:18:22  mysqld ended

then I chmod 777 /var/db/mysql

and I try again the mysqld_safe
Code:
Lodelservoo# /usr/local/bin/mysqld_safe --user=mysql
Starting mysqld daemon with databases from /var/db/mysql
STOPPING server from pid file /var/db/mysql/Lodelservoo.workgroup.pid
050505 13:22:01  mysqld ended

So I watch one more time in the Lodelservoo.workgroup.err logfile
Code:
Lodelservoo# vi Lodelservoo.workgroup.err

050505 13:22:00  mysqld started
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
050505 13:22:00  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
050505 13:22:01  InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
050505 13:22:01  InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./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
050505 13:22:01  InnoDB: Started; log sequence number 0 0
050505 13:22:01 [ERROR] /usr/local/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
050505 13:22:01 [ERROR] Fatal error: Can't open privilege tables: Can't find file: './mysql/host.frm' (errno:
13)
050505 13:22:01  mysqld ended

I am lost, I don't understand why it can't find the host.rfm whereas I launch mysqld_safe in the work directory /var/db/mysql/test and the host.frm exist at this place /var/db/mysql/mysql/host.frm

I don't understand why I have to chmod 777 mysql whereas a 700 should be enough Smilie

Last edited by SoulCoder; 05-05-2005 at 08:48 AM..
 

5 More Discussions You Might Find Interesting

1. Red Hat

comm: mysqld Not tainted ... Kernel Panic , System totally unresponsive

Hi, I am experiencing frequent system hangs, hard kernel panics, etc almost thrice a day. The system would be totally unresponsive and the only way is to reboot is hard power recycling (plug out the power cable and plug in back after 30 secs). I enabled kdump, but unfortunately the kdump files... (3 Replies)
Discussion started by: massoo
3 Replies

2. UNIX for Dummies Questions & Answers

mysqld overloading cpu of VPS

Hi bros I have a VPS 512mb (Burst 2GB) with Kloxo installed and hosting few sites on it with not much traffic I am facing high cpu load for the last few days and seems mysqld is overloading the cpu Any suggestion will be appreciated Regards Rizwan Top output is as under top -... (2 Replies)
Discussion started by: rizwan65
2 Replies

3. Red Hat

MySQL (mysqld) fails to start!

Hello, I have recently installed MySql and I encourage an error. I am using Fedora 15 and when I am trying to start mysqld service i am getting the following error message: Starting mysqld (via systemctl): Job failed. See system logs and 'systemctl status' for details. If I try to start it... (4 Replies)
Discussion started by: dot_pro
4 Replies

4. Programming

PHP exec to restart mysqld

I want to do something very very bad. I want to create a button that restarts mysqld. Why is irrelevant for my issue. Here is my php script ... <?php if(isset($_POST)){ exec("sudo /etc/init.d/mysqld restart"); } ?> <form method="POST"> <input type="submit" name="restart"... (3 Replies)
Discussion started by: noPermissions
3 Replies

5. Homework & Coursework Questions

Mysql missing mysqld.sock (Linux)

I am trying to start a server for a class I am in but... mysql won't start with this error ( ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) ) ---------- Post updated at 03:51 PM ---------- Previous update was at 03:50 PM ---------- ... (2 Replies)
Discussion started by: Slayer939
2 Replies
All times are GMT -4. The time now is 02:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy