CodeIgniter Forums
Problems with database access, CI changes the DB name - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Problems with database access, CI changes the DB name (/showthread.php?tid=6157)



Problems with database access, CI changes the DB name - El Forum - 02-16-2008

[eluser]Niklas Stephenson[/eluser]
Hi forum!

First, sorry for my bad english :/

I am moving a CI based site from Servage.net to MediaTemple, but on media temple my site generates a MySQL error when i try to insert data to the database, it is this error:

Quote:Error Number: 1044

Access denied for user 'db33215'@'%' to database 'imageload'

INSERT INTO `imageload`.`images_v2` ( `id` , `new_file_title`, `file` , `timestamp` , `ip`, `orig_name`, `file_size`, `image_type`, `user_id`, `galleri_id`, `secret` ) VALUES ( NULL , '0ef08cec06bae57da61fefd60baeb7b5', '0ef08cec06bae57da61fefd60baeb7b5.jpg', '1203177797', '84.238.90.231', 'test01.jpg', '186.89', 'jpeg', '0', '0', '' )

But if i look at the sql code i can se that the database name has change from the one in my config file:

$db['default']['database'] = "db33215_imageload";

How do i fix this issu, and why dos it happen?

Thanks for the help and a great freamwork!


Problems with database access, CI changes the DB name - El Forum - 02-16-2008

[eluser]Seppo[/eluser]
I don't think CI insert the db name before the table name... Aren't you writing that on your code? can you copy it?


Problems with database access, CI changes the DB name - El Forum - 02-16-2008

[eluser]Niklas Stephenson[/eluser]
It was my error, thanks for the help!