Mysql – Create thesql database and user with only system root privileges but not thesql root privileges

MySQLroot

I have been granted root privileges to a server for a class project. I need to create mysql databases and users. I without tracking down the right people at the university do not have mysql root privileges though. Is this possible without resetting the mysql root password?

server distro fedora
mysql version 5.5

thx in advance

Best Answer

I don't think there's any way to set up mysql users from system root without clobbering the existing mysql root user (unless you happen to have a fully-privileged mysql user that doesn't happen to be root.) Some database engines (like Oracle) recognize a particular system user as a DBA user, but to the best of my knowledge MySQL doesn't do that.

If you can find the right person at the university who has the mysql root info, that'll be the simplest way.

Another option would be to set up a separate instance of mysql running off a different data directory, and start with a clean set of user permissions.

Or, as a long shot, poke around in root's home directory for a .my.cnf file that has the mysql root credentials stuffed in it.