Page 1 of 1

My SQL was working now it won't start.

Posted: Tue Nov 28, 2006 1:59 pm
by Scottty
Hi

I was executing php scripts on MySQL fine until I did a reboot a day ago and now I get the following message

I try to login to MySQL Administrator and I get the message
"MySQL error Number 2003
Can't connect to MySQL server on 'localhost'

I've posted my .err file for you to see what maybe happening. I don't understand it
  • InnoDB: The first specified data file .\ibdata1 did not exist:
    InnoDB: a new database to be created!
    061128 13:51:54 InnoDB: Setting file .\ibdata1 size to 10 MB
    InnoDB: Database physically writes the file full: wait...
    InnoDB: Error: all log files must be created at the same time.
    InnoDB: All log files must be created also in database creation.
    InnoDB: If you want bigger or smaller log files, shut down the
    InnoDB: database and make sure there were no errors in shutdown.
    InnoDB: Then delete the existing log files. Edit the .cnf file
    InnoDB: and start the database again.
    061128 13:51:54 [ERROR] Default storage engine (InnoDB) is not available
    061128 13:51:54 [ERROR] Aborting

    061128 13:51:54 [Note] C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt: Shutdown complete
Any guesses as to what has happened.

Thanks
Scott

Posted: Tue Nov 28, 2006 11:25 pm
by Scottty
I think I've found part of the problem when I tried

Code: Select all

telnet localhost 3306
I got the message :
Could not open a connection to host port 3306 Connect failed.

I have no firewall, so how are my ports blocked and better yet how can I unblock them.

Please Help
Scott

Posted: Wed Nov 29, 2006 1:18 am
by volka
Scottty wrote:061128 13:51:54 [Note] C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt: Shutdown complete
The mysql server is not running thus you cannot connect to it.
Try deleting the innodb log files and then restarting the server.

Posted: Wed Nov 29, 2006 3:02 am
by dibyendrah
looking at your log file, you have to follow following steps :

First edit my.cnf and do

Code: Select all

#skip-innodb
and start the mysql server.
If the problem still exists, ther might be some problem regarding the path given for inndob log files.

Do the following steps.

1.First create the directory structure for "innodb_data_home_dir" as given in my.cnf.
2. Create a directory structure for "innodb_log_group_home_dir"
3. Create a directory structure for "innodb_log_arch_dir "

Sample my.cnf file from my machine

Code: Select all

#skip-innodb
innodb_data_home_dir = /opt/lampp/var/mysql/
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /opt/lampp/var/mysql/
innodb_log_arch_dir = /opt/lampp/var/mysql/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
innodb_buffer_pool_size = 16M
innodb_additional_mem_pool_size = 2M
# Set .._log_file_size to 25 % of buffer pool size
innodb_log_file_size = 5M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50

Hope this will help you.

Cheers,
Dibyendra

Posted: Wed Nov 29, 2006 1:07 pm
by Scottty
Hi thanks for the info
I actually seem to have got MySQL running by going to Administrative Tools > Services and right clicking on MySQL and it now says Started under status

However when I try to login with MySQL Administrator GUI and login my password I get this message still

Code: Select all

MySQL error Number 2003
Can't connect to MySQL server on 'localhost'
Is it possible a virus is doing this?

I tried to reinstall MySQL but it won't let me install it now. When I first installed it I didn't have one problem.

What should I try to do now. I've looked all over the MySQL site and can't find a solution

I seem to be able to start MySQL but it shuts down when a few seconds later when I check properties in the
Administrative Tools > Services >MySQL properties it says service stopped.

This is weird!!1

Scott

Posted: Wed Nov 29, 2006 2:44 pm
by volka

Posted: Wed Nov 29, 2006 3:44 pm
by Obadiah
i can vouch for xampp...it a very well put together package it makes installation for php and mysql a breeze :)

Posted: Wed Nov 29, 2006 6:35 pm
by Scottty
Hi thanks again

I want to try xampp but I need to get rid of Mysql on my system now. For some reason the computer won't let me delete the folders. Even though I'm administrator?????

Any idea how I could do this?

I would give you the error I'm getting when I try to delete the folders but I'm at work right now
sorry

Scott

Posted: Wed Nov 29, 2006 7:04 pm
by volka
Maybe there's an active process with open handles to the files/directories.

see http://www.microsoft.com/technet/sysint ... andle.mspx

Posted: Wed Nov 29, 2006 11:32 pm
by dibyendrah
Scottty wrote:Hi thanks again

I want to try xampp but I need to get rid of Mysql on my system now. For some reason the computer won't let me delete the folders. Even though I'm administrator?????

Any idea how I could do this?

I would give you the error I'm getting when I try to delete the folders but I'm at work right now
sorry

Scott
First you have to stop the mysql service and go to add/remove program which will unistall everything. Before you do that just backup the data folder if you are unable to connect the mysql server.
But looking at your log file, you just first skip the inndob check by just commenting

Code: Select all

#skip-innodb
Have to followed the steps like I have given in this thread before like creating the log path etc... ?

And for installing xampp, go to http://apachefriends.org.

For windows :
http://www.apachefriends.org/en/xampp-windows.html
For linux:
http://www.apachefriends.org/en/xampp-linux.html

I have been using xampp and works fine and very easy to install as well.