I have given accidentally the name from “name.bplace.net” for usename and the database I want to restore here is constructed with privileges for another username. How can I change the username in bplaced? I would rather do that, than give permissions to the new username I have accidentally given.
…hm. So you’ve got a sql-dump for a database with a particular name, which is not equal to your bplaced-username, true?
well, in that case you’ve got the option to either edit the dump (what i’d recommend), by changing the usernames; or even to remove those lines. My assumption is that this dump also contains lines which define privileges for users to databases or something similar, there’s a great chance that these queries are invalid at bplaced due to missing privileges for your bplaced-sql-useraccount to assign such privileges, since this is prohibited and allowed to the bplaced-system only.
i’d suggest you tell us more about the dump, perhaps you may want to show us some lines from its beginning where privilege-queries are issued.
The first lines from the dump are:
– phpMyAdmin SQL Dump
– version 3.1.1
– Host: localhost
– Generation Time: Feb 21, 2009 at 06:00 PM
– Server version: 5.1.30
– PHP Version: 5.2.8
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT /;
/!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS /;
/!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION /;
/!40101 SET NAMES utf8 */;
(and so on)
I don’t see any lines refering to privileges. And on my PC I have added a user named by the name I gave here as username, but I guess that’s not carried on the dump anyway.
One more thing is that I tried to create a new database within phpmyadmin in bplaced and I got the
#1044 - Access denied for user ‘oldradiorepairs’@‘localhost’ to database 'test’
error again! I only can make tables in the default database.
On the user control panel I have this problem:
Sorry, your username is too long in order to add more than one database. The name
of a database is limited due to a MySQL-restriction to 16 characters, therefor you can’t add any further databases to your account. This restriction does not apply to PostgreSQL."
Is that why I can’t create new databases or import another database?
My username is 15-characters long, you say that it must be no more than 14. Can I delete this account and start over?
well, the 14-chars apply to mysql-restrictions, this cannot be changed that easily. you may of course create another account (just please disable your current on before, in the options-menu at the bottom).
You cannot create databases in phpmyadmin, that is true. this is controlled in your UCP in mysql-settings. this is due to the fact that sql-users must not be able to create databases, it has to be managed by the system, therefor in your UCP, not phpmyadmin or direct SQL-access.
another alternative is simply to replace the database-name in your dump by the name of your available database at bplaced. but this might require to much effort, so yes, you may create another bplaced user account.
I have made a new account and yes, I can make new databases with the prefix of my username, though. But I can’t import my database from my PC. Do I have to rename the database name to what my username is in here? That must be what you just said, no?
Well, at last! It was sooo simple! I just took bacnup of the contents of the database and restored them, not the database itself! Thanks for the help miro!