Though a very similar question has been asked (How to convert .sql file to tables in mysql db), my limited experience (read almost zero) of MySQL server means that that particular answer does not help me.
I have followed the steps from the first answer:
1.Create empty database for which I found the following command:
mysqladmin create myDBname
When I check /var/lib/mysql
I can see the folder myDBname with a placeholder db.opt file inside.
2.Read in the .sql file like so:
mysql -u root -p myDBname < dotSQLfile.sql
However, this doesn't appear to do anything. Should I expect the myDBname to be populated in some sense in the /var/lib/mysql/myDBname
directory?
When I run mysqlshow
it only lists 'information_schema' & 'test' as databases...? Yet if I manually run MySQL and source the .sql file, I can see the database within that environment and run queries:
mysql -u root -p
source dotSQLfile.sql;
show tables;
select * from table1;
but as soon as I quit mysql, it's no longer visible. Am I doing something wrong?
I should add I'm using MariaDB on Fedora19; mysqld is running.