# MySQL does not start



## znaminyto (Oct 6, 2010)

Hello,

I have MySQL 5.0.90 installed on my FreeBSD. I have a webpage, based on Joomla 1.5 on my LAN at work running on this machine. Yesterday I installed some of new extensions to Joomla and after that I couldn't login to Joomla back-end. Simply after I type in my username and password, hit Enter I get a blank page in Firefox and "The webpage cannot be displayed" message on IE. Then I rebooted my server, and now I see that mysql doesn't start, but the option mysql_enable="YES" is set in rc.conf. I tried to strat it manually and I got this error:


```
# /usr/local/etc/rc.d/mysql-server start
Starting mysql.
pam_login_access: pam_sm_acct_mgmt: mysql is not allowed to log in on /dev/ttyp0
su: Sorry
```

Can you tell me what is the problem?


----------



## znaminyto (Oct 6, 2010)

*I found the solution*

I did this:


```
1.  mysql_install_db --user=mysql
2. cd /usr/local
3. /usr/local/bin/mysqld_safe &
```
 And it worked

But still there is a problem with joomla, I can't get in Administration panel


----------



## rhyous (Oct 6, 2010)

It is probably a PHP setting or a Joomla bug keeping you from the Joomla Administration panel.  

I was recently reviewing CMS tools and I had the same issue. 

Have you tried SilverStripe?  It is BSD Licensed and runs on Postgresql which is BSD Licensed.
Drupal, Joomla, WordPress, SilverStripe, or other, which Content Management System (CMS) is best for a BSD user?

I just think it is nice to use BSD Licensed software.


----------



## znaminyto (Oct 7, 2010)

Well I installed a fresh copy of Joomla 1.5 to the other location on my server. Before that I backed up the old one's database. The new one Joomla worked perfectly, as it was a fresh install. But when I restored the old Joomla's database to the new one's everything wen the same way - I cannot enter the administration panel. I think this is some kind of bug in a database, maybe it is damaged. I think I'm gonna try PostgreSQL.


----------



## vtypal (Oct 7, 2010)

After uninstalling remove the whole /var/db/mysql dir, and install again. 

Immediately after the completion of your installation you must create the directory where your databases will be stored. Again with root privileges:
[cmd=]# /usr/local/bin/mysql_install_db [/cmd]

Give the appropriate permissions:
[cmd=]# chgrp -R mysql /var/db/mysql [/cmd]
[cmd=]# chown -R mysql /var/db/mysql[/cmd] 

Fire up with :
[cmd=]# /usr/local/bin/mysqld_safe -user=mysql &[/cmd]


----------



## znaminyto (Oct 8, 2010)

Well, but like I said there is a problem with one particular database. Do you think that reinstalling mysql would fix that database? I don't want to loose my present databses in mysql. If I am gonna reinstall the mysql I'm afraid that I will not gonna be able to use any of my websites on that server. Would simple all databses backup ensure that I will not loose my data on those different websites?


----------



## znaminyto (Oct 8, 2010)

I found this error to appear when I enabled error_reporting on joomla and tried to log in to administration panel


```
Fatal error: Call to undefined method stdClass::onAuthenticate() in /usr/local/www/joomla/libraries/joomla/user/authentication.php on line 121
```


----------



## SirDice (Oct 8, 2010)

znaminyto said:
			
		

> well, but like I said there is a problem with one particular database. Do you think that reinstalling mysql would fix that database?


No, it won't. The installation does NOT touch any existing databases. If a database is corrupt you will have to fix it yourself.



> Would simple all databses backup ensure that I will not loose my data on those different websites?


If you make a proper backup, yes.


----------



## znaminyto (Oct 8, 2010)

Can you tell me how to fix a database? I have never done this before.


----------



## SirDice (Oct 8, 2010)

That depends on the type of database/tables, MyISAM, InnoDB or something else. It also depends on what the corruptions are.


----------



## znaminyto (Nov 29, 2010)

Looks like the best way is to have a DB backup  people don't forget to do backups!!!


----------

