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
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>
As an additional resource, you can try two other things:
Find out the data folder for your MySQL and 'chown' it so that mysql can write properly to it. For example, if your MySQL's data folder is /usr/local/mysql/data/
, you can 'chown' it by typing up the command chown -R mysql:mysql /usr/local/mysql/data/
If you have just installed your MySQL server, try restarting your computer. Sometimes the installer fails on giving proper file access to the program
I hope that helps!
You have one root user for several domains. Meaning you can connect and run queries on that database FROM the specified domains.
If you want to only show one, give it '%' for the domain and remove all others, although that is not advised. Save the root user for run rights only from localhost, and create limited users for running queries from outside.
As for test database error, it happens on fresh installs. Just reboot the mysql server(stop/start process) or the computer.
Also, make sure you have full rights by doing
GRANT ALL PRIVILEGES ON *.* TO 'root'@'thedomainyourunfrom/localhost/%' WITH GRANT OPTION;
this will give your root user full rights across all databases in the server
osx manual http://dev.mysql.com/doc/mysql-macosx-excerpt/5.0/en/macosx-installation.html
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 :)