I'm using phpmyadmin and I'm trying to rename a database. My current database name has a dash (-) in it and that's apparently a bad thing.
I'm really new to creating databases so I don't know what to do and after all day of searching for help...didn't help.
So I either need to rename the database which doesn't seem possible, create a new database and dump structure and data and paste it over to the new db, dump original db and completely delete the db and create a new one. I just don't know which way to go.
If I just delete the db I have now, will phpmyadmin give me the 'create new database' box just like when there is no db there in the beginning? Can all of this be done by only using phpmyadmin?
Sorry if those are dumb questions but I really can't figure this out.
Try dumping it and then open the file in a text editor. There should be the create db command and you can change all references to the dashed db name and then import it again.
Don't drob the db until you test it, db names will be different so you should be able to have both coexist and then drop the original once you check that it worked.
Say my domain is my-database.com and my db name is my-database_com. When I search in the text file for my-database I find My-Database.com my-database_com and my-database. I'm guessing that I only change the my-database_com to mydatabase_com right?
If I knew how to create a new database I think this would be easy but the create db command line dissappeared after I created the first db. Can I create a new database from phpmyadmin or do I have to create it some other way?
I'm too afraid to drop each table individually and wait to see if I can delete the db and create a new one.
I've been waiting for a week and a half for my host to do it for me but he doesn't have time I guess. He only hosts a few sites so he shouldn't be that busy.
I don't think phpmyadmin supports renaming of databases.
For renaming your database you just have to rename the folder with 'my-database_com' to 'mydatabase_com' in the mysql database directory. So ask your server guy to do this. Its just a few minutes job. Otherwise you can dump the data from the database then drop it using phpmyadmin and a create a new one then dump the data back into it.
I don't think I have rights to delete db's, unless I'm doing it all wrong. I've been putting in the SQL query box DROP DATABASE and DELETE DATABASE my-database_com and it says the statements are disabled.
I tried going over to another one of my sites phpmyadmin and tried to drop one that is not being used out of the 5 db's there but it said the same thing.
So either I'm doing something wrong or I don't have rights.