1428a
![]() |
|
|
|
|
|||||||
| Web & Network Services Discussion related to network/web services such as apache, bind, sendmail, etc. |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I have some problem with starting mysql (5.5.10) on FreeBSD 8.1. When I try to start: /usr/local/etc/rc.d/mysql-server startCode:
Starting mysql. /usr/local/etc/rc.d/mysql-server statusCode:
mysql is not running. /usr/local/bin/mysqld_safe &Code:
110411 19:45:20 mysqld_safe Logging to '/home/db/hostname.err'. grep: grep: grep"74174: No such file or directory: No such file or directory grep: ": No such file or directory 110411 19:45:20 mysqld_safe Starting mysqld daemon with databases from /home/db Code:
# ps -auwx | grep mysql root 73915 0.0 0.5 3628 1180 1 I 7:36PM 0:00.04 /bin/sh /usr/local/bin/mysqld_safe mysql 74174 0.0 32.1 605508 79904 1 I 7:36PM 0:00.60 [mysqld] Code:
mysql -u root -p Enter password: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) Code:
mysql -h 127.0.0.1 -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. ... reppa Last edited by DutchDaemon; April 11th, 2011 at 19:44. Reason: Proper formatting: http://forums.freebsd.org/showthread.php?t=8816 |
|
#2
|
||||
|
||||
|
I'm assuming nothing is running in a jail?
But can you post the relevant rc.conf variables and/or your my.cnf?
__________________
Senior UNIX Engineer at Unix Support Nederland Experience is something you don't get until just after you need it. |
|
#3
|
|||
|
|||
|
Here is relevant information from my rc.conf:
Code:
mysql_enable="YES" Code:
[client] #password = your_password port = 3306 socket = /home/db/mysql.sock # The MySQL server [mysqld] port = 3306 socket = /home/db/mysql.sock datadir = /home/db/ skip-external-locking key_buffer_size = 384M max_allowed_packet = 1M table_open_cache = 512 sort_buffer_size = 2M read_buffer_size = 2M read_rnd_buffer_size = 8M myisam_sort_buffer_size = 64M thread_cache_size = 8 query_cache_size = 32M thread_concurrency = 8 #skip-networking log-bin=mysql-bin server-id = 1 #server-id = 2 #master-host = <hostname> #master-user = <username> #master-password = <password> #master-port = <port> #log-bin=mysql-bin #binlog_format=mixed #innodb_data_home_dir = /var/db/mysql #innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend #innodb_log_group_home_dir = /var/db/mysql #innodb_buffer_pool_size = 384M #innodb_additional_mem_pool_size = 20M #innodb_log_file_size = 100M #innodb_log_buffer_size = 8M #innodb_flush_log_at_trx_commit = 1 #innodb_lock_wait_timeout = 50 [mysqldump] quick max_allowed_packet = 16M [mysql] no-auto-rehash #safe-updates [myisamchk] key_buffer_size = 256M sort_buffer_size = 256M read_buffer = 2M write_buffer = 2M [mysqlhotcopy] interactive-timeout [mysql.server] user=mysql basedir=/usr/local/bin ls -l /home/Code:
drwx------ 5 mysql mysql 512 Apr 11 19:45 db ![]() reppa |
|
#4
|
|||
|
|||
|
You have some misconceptions about mySQL.... this is not a FreeBSD issue... it has to do with your mysql permissions and access... you should read up on mySQL.
|
|
#5
|
|||
|
|||
|
Have you run mysql_install_db on your system? Do the requested files exist (eg. /home/db/hostname.err)? Because if they don't, your system won't start. What do your logfiles suggest (which I highly doubt they exist, since /home/db/hostname.err is one of them)? If they exist, check your permissions on these files.
|
|
#6
|
|||
|
|||
|
Hi,
Here is my /home/db/hostname.err: Code:
110412 19:24:42 mysqld_safe Starting mysqld daemon with databases from /home/db 110412 19:24:42 [Warning] Ignoring user change to 'ser=mysql' because the user was set to 'my$ 110412 19:24:42 InnoDB: The InnoDB memory heap is disabled 110412 19:24:42 InnoDB: Mutexes and rw_locks use GCC atomic builtins 110412 19:24:42 InnoDB: Compressed tables use zlib 1.2.3 110412 19:24:43 InnoDB: Initializing buffer pool, size = 128.0M 110412 19:24:43 InnoDB: Completed initialization of buffer pool InnoDB: The first specified data file ./ibdata1 did not exist: InnoDB: a new database to be created! 110412 19:24:43 InnoDB: Setting file ./ibdata1 size to 10 MB InnoDB: Database physically writes the file full: wait... 110412 19:24:43 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... 110412 19:24:43 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: 127 rollback segment(s) active. InnoDB: Creating foreign key constraint system tables InnoDB: Foreign key constraint system tables created 110412 19:24:43 InnoDB: Waiting for the background threads to start 110412 19:24:44 InnoDB: 1.1.5 started; log sequence number 0 110412 19:24:44 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use 110412 19:24:44 [ERROR] Do you already have another mysqld server running on port: 3306 ? 110412 19:24:44 [ERROR] Aborting 110412 19:24:44 InnoDB: Starting shutdown... 110412 19:24:44 InnoDB: Shutdown completed; log sequence number 1595675 110412 19:24:45 [Note] /usr/local/libexec/mysqld: Shutdown complete 110412 19:24:45 mysqld_safe mysqld from pid file /home/db/xxxx.xxxx.no.pid ended Code:
-rw------- 1 mysql mysql 70 Apr 12 19:17 .my.cnf.84316 -rw------- 1 mysql mysql 1 Apr 12 19:17 .mysql.84316 -rw-rw---- 1 mysql mysql 5242880 Apr 12 19:24 ib_logfile0 -rw-rw---- 1 mysql mysql 5242880 Apr 12 19:24 ib_logfile1 -rw-rw---- 1 mysql mysql 18874368 Apr 12 19:24 ibdata1 -rw-rw---- 1 mysql mysql 1972 Apr 12 19:24 xxx.xxxx.no.err drwx------ 2 mysql mysql 2048 Apr 12 19:16 mysql -rw-rw---- 1 mysql mysql 29704 Apr 12 19:16 mysql-bin.000001 -rw-rw---- 1 mysql mysql 995332 Apr 12 19:16 mysql-bin.000002 -rw-rw---- 1 mysql mysql 126 Apr 12 19:24 mysql-bin.000003 -rw-rw---- 1 mysql mysql 57 Apr 12 19:24 mysql-bin.index drwx------ 2 mysql mysql 1024 Apr 12 19:16 performance_schema drwx------ 2 mysql mysql 512 Apr 12 19:16 test /usr/local/bin/mysql_install_db --basedir=/usr/local after I had deleted db-files from /home/dbreppa Last edited by DutchDaemon; April 12th, 2011 at 23:39. |
|
#7
|
|||
|
|||
|
Quote:
reppa Last edited by DutchDaemon; April 12th, 2011 at 23:40. |
|
#8
|
|||
|
|||
|
Once your files are installed successfully, you just use the relevant rc.d script to start mysqld. Before that, be sure you have killed all mysqld processes, because that is what the message of your logs tells you.
|
|
#9
|
|||
|
|||
|
Right permission to /tmp solved my problem. Mod can set this thread to solved.
|
|
#10
|
||||
|
||||
|
The permissions should be 1777 for that filesystem. That means it already had enough permissions. What exactly did you change it to?
__________________
Senior UNIX Engineer at Unix Support Nederland Experience is something you don't get until just after you need it. |
![]() |
| Tags |
| localhost, mysql |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Solved] MySQL does not start | znaminyto | Web & Network Services | 10 | November 29th, 2010 07:55 |
| [Solved] MySQL doesn't start after /var/log is cleared | mzelensky | Web & Network Services | 13 | September 26th, 2010 19:11 |
| [Solved] MySQL won't start at boot | makimoto | Installation and Maintenance of FreeBSD Ports or Packages | 14 | September 8th, 2010 11:56 |
| DBMail tries to start before MySQL | ph0enix | Web & Network Services | 2 | October 7th, 2009 04:57 |
| [Solved] MySql Server does not start | Ishildur | Installation and Maintenance of FreeBSD Ports or Packages | 22 | February 14th, 2009 17:28 |