# Trying to start up my mySQL



## Matsaki (Jul 10, 2005)

In the terminal, but get the following errors:



> PB-G4:~ mats$ cd /usr/local/mysql ; (./bin/safe_mysqld || ./bin/mysqld_safe)
> touch: /usr/local/mysql/data/PB-G4.local.err: Permission denied
> chown: /usr/local/mysql/data/PB-G4.local.err: Permission denied
> Starting mysqld daemon with databases from /usr/local/mysql/data
> ...



And Im lost


----------



## mdnky (Jul 11, 2005)

Moved from _The Cafe_ to _Programming & Scripting_.

+-----+

Did you set the root password for MySQL after installation?


----------



## Matsaki (Jul 11, 2005)

No


----------



## ksv (Jul 11, 2005)

You must start the server with root privileges and specify it to use the mysql user, id est

```
sudo -s
/usr/local/mysql/bin/mysqld_safe --user=mysql &
```


----------



## Matsaki (Jul 11, 2005)

Thanks, 
But,,, I don't get it really with user ID and where?

The result with the string above is:

PB-G4:~ mats$ sudo -s
Password:
PB-G4:~ root# /usr/local/mysql/bin/mysqld_safe --user=mysql &
[1] 27686
PB-G4:~ root# A mysqld process already exists


----------



## ksv (Jul 11, 2005)

Yes, the _--user=mysql_ tells the server to start up with the mysql user rather than the user you're currently logged in as, which would not work because it doesn't have the permissions to use the necessary directories.

You did it correctly - the error message you got indicates that MySQL is already running, which means you should be able to access your server.


----------

