Cory94bailly Posted May 31, 2009 Share Posted May 31, 2009 I am using SMF and I need to copy SOME of the fields to another mysql table. The two databases are on the same server.. The thing is that my MYSQL user does not have access to both databases, there are two users.. I need to copy the table smf_members (columns: ID_MEMBER, memberName, ID_GROUP, passwd, emailAddress, memberIP, memberIP2, id_activated, and additionalGroups) into another table 'members' Let me explain. User1 > smf_members > ID_MEMBER memberName (etc...) I need to copy those to this: User2 > members > ID_MEMBER memberName (etc...) I hope this will be very easy to do.. Thanks guys Quote Link to comment https://forums.phpfreaks.com/topic/160336-copy-mysql-data-into-another-table-with-another-mysql-user/ Share on other sites More sharing options...
.josh Posted May 31, 2009 Share Posted May 31, 2009 so why can't you change the permissions to grant access to it? Quote Link to comment https://forums.phpfreaks.com/topic/160336-copy-mysql-data-into-another-table-with-another-mysql-user/#findComment-846103 Share on other sites More sharing options...
Cory94bailly Posted May 31, 2009 Author Share Posted May 31, 2009 so why can't you change the permissions to grant access to it? That's the thing.. My friend has a dedicated server and he owns/manages a semi-popular website.. He is almost never online (when he is, he's too busy to do anything).. About this script, maybe it can export the selected table/columns into .sql, put that into the temp directory, then import the .sql but only import selected data. Quote Link to comment https://forums.phpfreaks.com/topic/160336-copy-mysql-data-into-another-table-with-another-mysql-user/#findComment-846106 Share on other sites More sharing options...
Cory94bailly Posted May 31, 2009 Author Share Posted May 31, 2009 Sorry.. why was this moved? I want a php script, not to just do it once.. Quote Link to comment https://forums.phpfreaks.com/topic/160336-copy-mysql-data-into-another-table-with-another-mysql-user/#findComment-846110 Share on other sites More sharing options...
Ken2k7 Posted May 31, 2009 Share Posted May 31, 2009 Because it's a MySQL-related more than it is PHP-related. Just because you can run SQLs via a PHP function doesn't make this a PHP matter. Export or mysqldump the smf_members table and import it to yours. Quote Link to comment https://forums.phpfreaks.com/topic/160336-copy-mysql-data-into-another-table-with-another-mysql-user/#findComment-846111 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.