Posted in Database on March 5th, 2009 No Comments »
First, create the tables in your new Postgres database. I used a program called Navicat. You should create the tables by hand because the field types are different in MySQL and Postgres.
Use the following command to get mysqldump to create a dump file of the database that you can upload. You can [...]
Posted in Database on March 5th, 2009 No Comments »
As a regular user, or as root if you leave off the sudo bits:
sudo yum -y install postgresql postgresql-server php-pgsql
sudo /sbin/chkconfig postgresql on
sudo /sbin/service postgresql start
This is setting up the postgres user. Enter a password you’ll remember when prompted.
sudo passwd postgres
After this command, enter that password again. Now you’ll be logged in as [...]
Posted in Database on January 31st, 2008 3 Comments »
I’ve you’re just starting to play with a Union, then you might have gotten the error message:
#1221 – Incorrect usage of UNION and ORDER BY
You might be thinking: Whoa, hang on there! Do you mean MySQL can’t order a Union?! Oh, but it can! First little issue I had was in realizing [...]
Posted in Database, Web on May 18th, 2007 No Comments »
You can safely use PHPMyAdmin to export a database, just save it to a file on your computer.
Then use a program in WinSCP to upload that file to your Web Server.
Next, edit your /etc/my.cnf to include the following line:
set-variable=max_allowed_packet=64M
Then start the MySQL command console ‘mysql -u root -p’, and type ’source localhost.sql’