Still working on a way to port a sloppy Access database to MySQL. In the end it would be lovely to have a shell script doing all steps in a row:
- Extract the tables of the database as .csv
- Create a new (empty) MySQL database
- Create all tables in the new MySQL db
- Import the .csvs into those tables
One of the necessary steps is to create a new MySQL database:
$ mysql -u ''adminusername'' -p
mysql> CREATE DATABASE ''databasename'';
mysql> GRANT ALL PRIVILEGES ON ''databasename''.* TO "''username''"@"''hostname''" IDENTIFIED BY "''password''";
mysql> FLUSH PRIVILEGES;
mysql> EXIT
I just collected the code, did not try it out. Just not to forget….
Nice one .. thank you for sharing