The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > BSD
Google UNIX.COM


BSD BSD, sometimes called Berkeley Unix, is a Unix operating system developed by the Computer Systems Research Group of the UC Berkeley.

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-04-2005
SoulCoder's Avatar
Registered User
 

Join Date: Apr 2005
Location: Metz in France
Posts: 8
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
mysqld

Hello

I installed mysql41 this is the end of the installation
Quote:
You already have a group "mysql", so I will use it.
mysql:*:88:88::0:0:MySQL Daemon:/var/db/mysql:/sbin/nologin
You already have a user "mysql", so I will use it.
===> Compressing manual pages for mysql-server-4.1.11_1
===> Registering installation for mysql-server-4.1.11_1
===> SECURITY REPORT:
This port has installed the following files which may act as network
servers and may therefore pose a remote security risk to the system.
/usr/local/libexec/mysqld

If there are vulnerabilities in these programs there may be a security
risk to the system. FreeBSD makes no guarantee about the security of
ports included in the Ports Collection. Please type 'make deinstall'
to deinstall the port if this is a concern.

For more information, and contact details about the security
status of this software, see the following webpage:
http://www.mysql.com/
but when I try to launch the mysqld daemon it write this:
Quote:
$ /usr/local/libexec/mysqld
050504 15:31:13 [Warning] Can't create test file /var/db/mysql/Lodelservoo.lower-test
/usr/local/libexec/mysqld: Can't change dir to '/var/db/mysql/' (Errcode: 13)
050504 15:31:13 [ERROR] Aborting

050504 15:31:13 [Note] /usr/local/libexec/mysqld: Shutdown complete
note: LodelServoo is a CMS which need mysql


I verify that the dir mysql existed under /var/db, but it doesn't so naively I created it and launch again the mysqld but each time i have the same error message.

If someone know something about it he is welcoming

Thanks in advance
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 05-04-2005
Registered User
 

Join Date: Mar 2005
Posts: 63
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
You really don't need to call /usr/local/libexec/mysqld directly.

see man mysqld_safe(1)

you also need to run /usr/local/bin/mysql_install_db to install the initial db file structure.

in order to start mysqld for the first time, I did:

# /usr/local/bin/mysqld_safe --user=mysql --dbdir=/path/to/my/db

then secured the initial accounts, etc, etc, etc. This stuff is all covered in the MySQL manual, which should be installed on your system in several formats in:

/usr/local/share/doc/mysql

Good luck!
Reply With Quote
  #3 (permalink)  
Old 05-05-2005
SoulCoder's Avatar
Registered User
 

Join Date: Apr 2005
Location: Metz in France
Posts: 8
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
the right way

Thanks

I will follow those steps



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

Last edited by SoulCoder; 05-05-2005 at 04:48 AM.
Reply With Quote
  #4 (permalink)  
Old 05-05-2005
SoulCoder's Avatar
Registered User
 

Join Date: Apr 2005
Location: Metz in France
Posts: 8
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
YES :P

I found an answer at this url http://sunsite.mff.cuni.cz/MIRRORS/f...ng_server.html

Posted by davidhj@mail.com on Tuesday January 29 2002, @8:30am [Delete] [Edit]
If your error log file has something like:

Can't find file: './mysql/host.frm' (errno: 13)

, and you've tried setting
--datadir=/path/to/my/data/directory but you
still get the same error, it may be because the
databases installed in the mysql data directory
(usually /var/lib/mysql) are not owned by the
mysql daemon, but by the user who ran
mysql_install_db. chown them to mysql and chgrp
them to the appropriate group e.g.

chown -R mysql /var/lib/mysql/mysql
chgrp -R daemons /var/lib/mysql/mysql


And now the mysqld daeomn run
the content of the logfile is
Code:
050505 15:40:03  mysqld started
050505 15:40:04  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
050505 15:40:04  InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 43634.
InnoDB: Doing recovery: scanned up to log sequence number 0 43634
050505 15:40:04  InnoDB: Flushing modified pages from the buffer pool...
050505 15:40:04  InnoDB: Started; log sequence number 0 43634
/usr/local/libexec/mysqld: ready for connections.
Version: '4.1.11'  socket: '/tmp/mysql.sock'  port: 3306  FreeBSD port: mysql-server-4.1.11_1
~
Thanks everybody
Reply With Quote
  #5 (permalink)  
Old 05-06-2005
SoulCoder's Avatar
Registered User
 

Join Date: Apr 2005
Location: Metz in France
Posts: 8
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
Hello, I have the problem that mysql wont start at boot.

First, even after the install of mysql41-server ports there was no /usr/local/etc/rc.d/mysql-server.sh
So Naevely I copy the /usr/ports/database/mysql41-server/files/mysql-server.in.sh at the usual place /usr/local/etc/rc.d/, then I wrote mysql_enable="YES" in the rc.conf. The result is nothing, I'm still having to start mysql manually by /usr/local/bin/mysqld_safe
Does some one know something about it

Thanks in advance

I install from scratch all the installation, the mysqld-server is at the right place and now it's run well

Special thanks to Jolko for his help

this topic can be close

Last edited by SoulCoder; 05-11-2005 at 10:11 AM.
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes


The 50 most popular UNIX and Linux searches.
Google Search Cloud for The UNIX and Linux Forums
421 service not available, remote server has closed connection ^m automate ftp autosys awk trim bash eval bash for loop boot: cannot open kernel/sparcv9/unix command copy/move folder in unix couldn't set locale correctly curses.h cut command in unix daemon process find grep find mtime find null character in a unix file grep multiple lines grep or grep recursive hp-ux ifconfig inaddr_any inappropriate ioctl for device lynx javascript mailx attachment mget mtime perl array length ping port remove first character from string in k shell replace space by comma , perl script scp recursive segmentation fault(coredump) sftp script snoop unix stale nfs file handle syn_sent tar exclude tar extract to folder test: argument expected unix unix .profile unix forum unix forums unix internals unix interview questions unix mtime unix simulator unix.com vi substitute while loop within while loop shell script


All times are GMT -7. The time now is 01:25 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101