Welcome Guest, Not a member yet? Register   Sign In
Problems with database access, CI changes the DB name
#1

[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!
#2

[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?
#3

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




Theme © iAndrew 2016 - Forum software by © MyBB