views:

68

answers:

3

I can not use MySQL. MySQL is on my local computer. Currently I added skip-grant-tables in My.ini so I can use MySQL. But I have no privilege to create a new database. My problem is tough, although I asked related questions on SO, but no answer can resolve my problem. I almost give up. So I lower my expectation. I am developing a website, so I need to create database, tables and operate tables. You don't have to consider security. Is there a simple solution that can give me privilege to create a new database? Maybe by adding some command in my.ini or something? You won't need to completely resolve my problem. Maybe after the development, I will upload the database and tables to another server(The current database server is my personal computer, windows XP) so I can uninstall and reinstall MySQL.

The root of problem is that I lack privileges.

A: 

I'm not sure if this will work for you, since you might need to have elevated privileges in the first place, but it's worth a shot.

There should be a database called mysql. Take a look in there, and you'll see a table called users. For each record, there's a heap of columns named Select_priv, Insert_priv, etc. For your user record, change each of these to "Y".

nickf
I add a new record with localhost,root, but I still get an error#1130 - Host 'localhost' is not allowed to connect to this MySQL server
Steven
A: 

It sounds a bit like your installation went astray.

Maybe uninstall/resinstall is your best option, assuming that you've never been able to connect, so there is no data to consider.

Take your time on the installation, and have a look at MySQL Postinstallation Notes

Steve De Caux
A: 

you have 4 questions open about this specific problem. instead of opening duplicates, you should instead update just one of them with new information.

but the simple solution to your problem is to download the ZIP file of mysql for your mysql version from the mysql website and just copy the data\mysql folder in to your data file, then restart the service. this will give you a root user with a blank password that has full access.

longneck