Hi Malcolm, On 16 December 2011 12:46, Malcolm Locke <[email protected]> wrote: > On Fri, Dec 16, 2011 at 12:19:12PM +1300, Jochen Daum wrote: >> Hi, >> >> I need to move a database of a symfony 1.4 system to another server. >> What I have done is: >> >> 1) edit config/databases.yml, so that no access is possible >> 2) symfony cc for this to take effect >> 3) mysqldump --all-databases localhost | mysql -hnewserver -u****-p**** >> 4) edit config/databases.yml to >> >> >> all: >> doctrine: >> class: sfDoctrineDatabase >> param: >> dsn: mysql:host=newserveripaddress;dbname=dbname >> username: **** >> password: **** >> >> 5) symfony cc >> >> After I do this I get Apache error 500: >> >> [Fri Dec 16 11:50:12 2011] [error] [client 121.98.132.38] PDO >> Connection Error: SQLSTATE[28000] [1045] Access denied for user >> '****'@'theoldipaddress' (using password: YES) >> >> I used grep to find any other instances of the symfony host name, but >> can't find any. Any ideas why this doesn't work? > > You probably need to: > > GRANT ... ON dbname.* TO user@theoldipaddress IDENTIFIED BY 'password'; > > on the new database server. The value of ... will depend on your > requirements, for most people is 'ALL PRIVILEGES'. > thanks that helped.
I had actually setup user@% on the old server before transferring all databases over, but the IP address must be somewhere stored in there with it. What I have now done is transfer only the production database and switched over and that works. Thanks again, Jochen -- NZ PHP Users Group: http://groups.google.com/group/nzphpug To post, send email to [email protected] To unsubscribe, send email to [email protected]
