DeveloperSide.NET Forums
July 06, 2020, 05:00:10 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: MySQL won't start  (Read 17109 times)
0 Members and 1 Guest are viewing this topic.
Alec
Member
*
Posts: 12


View Profile
« on: June 26, 2006, 09:07:50 AM »

I got a new laptop and downloaded the latest suite yesterday (June 25th) then I followed the instructions to downgrad PHP5 to PHP4.

Now MySQL won't start. If I try to start it manually I get:
'Could not start the MySQL service on Local Computer.
Error 1067: The process terminated unexpectedly.'

I may have made a cockup of this part:
Quote from: "admin"
Login to the MySQL shell with user 'root'
mysql -u root -p
(if asked, enter password for root -- by default it is not set)

Code:

mysql> SET PASSWORD FOR 'root'@'localhost' = OLD_PASSWORD('your-current-passowrd-for-root');

mysql> SET PASSWORD FOR 'pma'@'localhost' = OLD_PASSWORD('your-current-password-for-pma');

(the default password for user 'pma' is 'pmapass' -- unless you have changed it)

when I first typed that in, I wasn't using semicolon at the end (I am a n00b in many senses of the word).

Apologies if this has been answered before. I searched but couldn't find anything.
Logged

i]I feel a lot more like I do now than I did half an hour ago[/i]
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #1 on: June 26, 2006, 01:36:05 PM »

Hmm, it seems the MySQL Service will not start...
Check file \www\mysql\data\*yoursystemname*.err
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
Alec
Member
*
Posts: 12


View Profile
« Reply #2 on: June 26, 2006, 04:16:19 PM »

Quote from: "AJM.err"
InnoDB: The first specified data file .\ibdata1 did not exist:
InnoDB: a new database to be created!
060625 22:52:55  InnoDB: Setting file .\ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
060625 22:52:55  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...
060625 22:52:55  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
060625 22:52:58  InnoDB: Started; log sequence number 0 0
060625 22:52:59 [Note] MySQL: ready for connections.
Version: '5.0.18-nt-log'  socket: ''  port: 3306  MySQL Community Edition (GPL)
060625 22:53:26 [Note] MySQL: Normal shutdown

060625 22:53:26  InnoDB: Starting shutdown...
060625 22:53:29  InnoDB: Shutdown completed; log sequence number 0 43655
060625 22:53:29 [Note] MySQL: Shutdown complete

060625 22:54:47  InnoDB: Started; log sequence number 0 43655
060625 22:54:51 [Note] MySQL: ready for connections.
Version: '5.0.18-nt-log'  socket: ''  port: 3306  MySQL Community Edition (GPL)
060626  0:01:10 [Note] MySQL: Normal shutdown

060626  0:01:10  InnoDB: Starting shutdown...
060626  0:01:11  InnoDB: Shutdown completed; log sequence number 0 43655
060626  0:01:11 [Note] MySQL: Shutdown complete

060626 11:53:38  InnoDB: Started; log sequence number 0 43655
060626 11:53:44 [Note] MySQL: ready for connections.
Version: '5.0.18-nt-log'  socket: ''  port: 3306  MySQL Community Edition (GPL)
060626 14:15:23 [Note] MySQL: Normal shutdown

060626 14:15:23  InnoDB: Starting shutdown...
060626 14:15:24  InnoDB: Shutdown completed; log sequence number 0 43655
060626 14:15:24 [Note] MySQL: Shutdown complete
Logged

i]I feel a lot more like I do now than I did half an hour ago[/i]
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #3 on: June 26, 2006, 04:41:14 PM »

Quote

060626 11:53:44 [Note] MySQL: ready for connections.
...
060626 14:15:24 [Note] MySQL: Shutdown complete.


Looks like the MySQL Service is running.
What happens when you open cmd.exe and run...
mysql -u root
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
Alec
Member
*
Posts: 12


View Profile
« Reply #4 on: June 26, 2006, 04:56:56 PM »

ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

I think it was after 11:53 that I did the downgrade.

*
The pages I was testing have some includes which weren't getting parsed by php. I'm using Opera and didn't get an error message, only the static page text.
After downgrading (and the same response from Opera), I tried IE and got 'Unable to connect to SQL server'.
After pondering the mysql_pconnect string I realised that MySQL wasn't running.

*
Though now Opera is giving me the same error. I'm sure it wasn't before.
Logged

i]I feel a lot more like I do now than I did half an hour ago[/i]
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #5 on: June 26, 2006, 05:12:31 PM »

Run this...
net stop mysql
mysqld-nt remove
mysqld-nt install
net start mysql
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #6 on: June 27, 2006, 01:34:49 AM »

Also run 'services.msc' and double click on the mysql service, make sure its comming from \www\mysql\bin
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
Alec
Member
*
Posts: 12


View Profile
« Reply #7 on: June 27, 2006, 01:35:20 AM »

Hmmm

The MySQL service could not be started
A system error has occurred
System error 1067 has occured
The process terminated unexpectedly


Here's my c:\windows\my.ini (minus some comments) if it helps:
Quote from: "my.ini"
# Example MySQL config file for medium systems.
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /usr/local/var) or
# ~/.my.cnf to set user-specific options.
#
# The following options will be passed to all MySQL clients
[client]
#password   = your_password
port      = 3306
socket      = C:/www/tmp/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
set_variable = old_passwords = 1
#bind-address   = 127.0.0.1
port      = 3306
socket      = C:/www/tmp/mysql.sock
basedir      = C:/www/mysql/
datadir      = C:/www/mysql/data/
skip-locking
key_buffer = 16M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 8M

log-bin=mysql-bin

server-id   = 1

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

I'm not that familiar with MySQL. Should I uncomment 'safe-updates'?
Logged

i]I feel a lot more like I do now than I did half an hour ago[/i]
Alec
Member
*
Posts: 12


View Profile
« Reply #8 on: June 27, 2006, 01:38:07 AM »

Quote from: "admin"
Also run 'services.msc' and double click on the mysql service, make sure its comming from \www\mysql\bin

Path to executable - C:\www\mysql\bin\mysqld-nt MySQL
Logged

i]I feel a lot more like I do now than I did half an hour ago[/i]
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #9 on: June 27, 2006, 01:52:28 AM »

Make sure you do not have any C:\my, my.ini, my.cnf files and try commenting out line...
set_variable = old_passwords = 1
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
Alec
Member
*
Posts: 12


View Profile
« Reply #10 on: June 27, 2006, 02:11:03 AM »

Quote from: "admin"
Make sure you do not have any C:\my, my.ini, my.cnf files and try commenting out line...
set_variable = old_passwords = 1


old_passwords did the trick.

Thanks very much!

Does that mean I did something wrong in that part of the downgrade?
Logged

i]I feel a lot more like I do now than I did half an hour ago[/i]
nox120
Member
*
Posts: 2


View Profile
« Reply #11 on: June 30, 2006, 08:49:50 AM »

Hi,

I'm having exactly the same problem. We've installed 4.1.20 (This also happens on 4.0.22 but doesn't seem to on 5) and it starts fine first time but then if you stop/start the service it gives the error:

'Could not start the MySQL service on Local Computer.
Error 1067: The process terminated unexpectedly.'

You can get around this by deleting the files within the /data/ directory (Not the folders just the ib files and .err/.pid files). Once those are deleted it will start fine however 1) It's a pain and 2) It seems to have corrupted some tables when we did this last night after a reboot.

I've checked the my.ini file and we don't have the 'set_variables = old_passwords = 1' line and I've also checked the mySQL path in the service which is as follows:

"C:\Program Files\MySQL\MySQL Server 4.1\bin\mysqld-nt" --defaults-file="C:\Program Files\MySQL\MySQL Server 4.1\my.ini" MySQL

Any ideas?

Cheers,

David.
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #12 on: June 30, 2006, 11:46:19 AM »

Quote
You can get around this by deleting the files within the /data/ directory (Not the folders just the ib files and .err/.pid files). Once those are deleted it will start fine however 1) It's a pain and 2) It seems to have corrupted some tables when we did this last night after a reboot.

Any ideas?


I remember the same exact solution to a mysql problem I had some time ago... Around 2004.
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
nox120
Member
*
Posts: 2


View Profile
« Reply #13 on: June 30, 2006, 11:52:28 AM »

Did you ever solve it completely so you didn't have to keep doing that?

We've tried formatting the server and start from scratch but it still does it. Must be something with the database but we have another server with 4.0.22 that it runs perfectly on.
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #14 on: June 30, 2006, 01:02:32 PM »

It was just some quirk -- delete data files once and everything ran from then on...

Now when I upgraded to MySQL 4.1 on the RedHat box that devside.net ran under, I had nothing but problems. Had to revert back to 4.0...

http://forums.devside.net/viewtopic.php?t=545
Quote from: "admin"
Just when I thought everything was fine, more problems came.

We have been experiencing close to 30-50% downtime.  For some reason the new server has been crashing about once every day -- with nothing in the logs to help track this down.  I have disabled most of the un-needed Services and have reverted back to MySQL 4.0 (from 4.1).  We'll see if that helps.  Aside from a software problem, this could be a result of bad RAM, a faulty CPU fan, etc...  Which would be even worse, as than I would need to convince the datacenter to start replacing components.


Quote from: "admin"
It looks like MySQL v4.1 was the culprit after all.  After reverting back to v4.0, the Server has been running just fine.

I will make a mental note to myself to never use the words 'production ready' and 'MySQL' in the same sentence.  Not that I ever have.

I would recommend to anyone to use http://www.sqlite.org/ for a simple database, AND http://www.postgresql.org/ for anything else.


See if you really need mysql and if not -- drop it.
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!