After I had installed phpMyAdmin (in my case centos, using YUM) I received a 403 forbidden error. By default phpmyadmin installed path is /usr/share/phpmyadmin and the apache configuration file is located in /etc/httpd/conf.d/phpmyadmin.conf.
To fix:
vi /etc/httpd/conf.d/phpmyadmin.conf
Remove or comment these lines
#Order Allow,Deny
#Deny from all
Allow from 127.0.0.1
Restart the apache server.
/etc/init.d/httpd restart
You should be able to see phpmyadmin working by going to http://ipaddress/phpmyadmin
Showing posts with label mysql. Show all posts
Showing posts with label mysql. Show all posts
Friday, March 13, 2009
Friday, February 29, 2008
Import a CSV file into MySql
I recently received a CSV file that I needed to import into MySQL, I tried to use Navicat on a Windows machine but the file was large enough to cause it to hang. So I went to the command line on the server and created it as follows
mysqlimport --fields-terminated-by="," --fields-optionally-enclosed-by="\"" --lines-terminated-by="\n" databasename /pathtocsvfile/csv.csv -u mysqlusername -p
note that the name of the file I was importing was csv.csv, in order for this to work you must have created a table that will accept this data wit the same name as the file you are importing (minus the extension)
mysqlimport --fields-terminated-by="," --fields-optionally-enclosed-by="\"" --lines-terminated-by="\n" databasename /pathtocsvfile/csv.csv -u mysqlusername -p
note that the name of the file I was importing was csv.csv, in order for this to work you must have created a table that will accept this data wit the same name as the file you are importing (minus the extension)
Wednesday, July 25, 2007
Guide : MySQL Importing and Exporting
Importing a SQL File from the command line
Exporting a SQL File from the command line
mysql -u USER -p DBNAME < FILENAME.sql
Exporting a SQL File from the command line
mysql -u USER -p DBNAME > FILENAME.sql
Subscribe to:
Comments (Atom)