I can't create a database after logging in mysql under my root account. Do I have to make an admin account to do so? Also, for some reason, my StartUp file didn't install (there was an error). I'm not sure if that will affect anything else since mySQL DOES start up when I type "mysql" into my terminal.
Also when I type in
mysql> SELECT Host, User FROM mysql.user;
+---------------------+------+
| Host | User |
+---------------------+------+
| 127.0.0.1 | root |
| ::1 | root |
| myname-mac.att.net | |
| myname-mac.att.net | root |
| localhost | |
| localhost | root |
+---------------------+------+
Which I don't get. I seem to have multiple root users and I don't know what ::1 means.
EDIT: My databases currently look like this.
mysql> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
+--------------------+
1 row in set (0.02 sec)
And it doesn't matter what I type in as my database name. I even tried calling it 'apple'.
It might be problem with space. Follow this
/var/lib/mysql
if the log says something like "[ERROR] Can't start server: can't create PID file: No space left on device"
Check /var size by df -hk /var
if used is 100% , then u have to find the files which is geting filled.
find large file in /var by
find /var/ -type f -size +100000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'
see which file you can delete and then restart the mysql process by
/etc/init.d/mysql restart
let me know if that worked :)
If you're on macosx and if you've system preference pane installed, that should show a message like
the following directory is not owned by _mysql user - "/usr/local/msyql/data"
Once you know that path you can do the following:
sudo chown -R mysql:mysql /usr/local/mysql/data
sudo chown -R mysql:mysql <path>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With