-
SpotVPS First Impressions
After the unfortunate incident last week with NordicVPS, I decided to look for a new VPS host. As usual, I went to lowendbox and get the reviews in webhostingtalk. It’s there where I stumbled upon a promo from SpotVPS. As it turns out, SpotVPS is a low-cost VPS offering of ComfortHost.NET. And who are they?…
-
How to Upgrade MySQL 5.0 to 5.5 in CentOS
I upgraded the installed MySQL on my two VPSes about two months ago and I thought I already saved the steps somewhere or at least the saved the URL of the how to. I did not so when I tried to upgrade the Pagudpud Resort‘s (owned by the Jackoleros) database server, I don’t know where…
-
Update User Password in MySQL
Apparently, quite a number of people are looking into my humble website trying to find out how to change a password of an existing user. Doing this is easy in Oracle with a ALTER USER command. In MySQL, it is different in such a way that you need to update a table. Here’s the command.
-
MySQL Fail To Start After Upgrade to 5.1 or higher
I recently upgraded my MySQL in preparation for WordPress 3.2. The version I now have is 5.5.12. The upgrade finished without a hitch but when I tried to restart the service, the MySQL Daemon failed. Here’s the log of mysql (/var/log/mysqld.log) 110514 14:04:22 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 110514 14:04:22 [Note] Plugin…
-
MySQL Dump and Reload
This one has been on my draft for more than a year already so I better fix it up and share. Besides, I find myself more and more googling my site to find my posts instead of searching via the WP admin. Without further ado, here it is..
-
Date Functions in MySQL
Here’s few of the usual equivalent Oracle data functions in MySQL. DATE ADD (SYSDATE +/-1) SELECT DATE_ADD(SYSDATE(),INTERVAL 1 DAY); SELECT DATE_ADD(SYSDATE(),INTERVAL -10 DAY);
-
Reset MySQL Root Password in CentOS
“Senior moments” tends to occur more frequently these days. Sign that I’m getting old. And several times already, I forgot the root password of my MySQL installation. You can recover MySQL database server password with following five easy steps.
-
Oracle NVL Equivalent in MySQL
Here’s the MySQL equivalent of Oracle’s NVL and MSSQL/Sybase’s ISNULL functions. Syntax IFNULL(expr1,expr2) Usage If expr1 is not NULL, IFNULL() returns expr1; otherwise it returns expr2. Take note that IFNULL() returns a numeric or string value, depending on the context in which it is used. I haven’t used it for other data types yet but…
-
MySQL SEQUENCE Equivalent
Most Oracle guys (and I heard PostgreSQL, too) will be missing sequence in MySQL. The nearest equivalent that MySQL has for this feature is the AUTO INCREMENT field. However, auto increment is sometimes not sufficient and time will come that you will be missing it. Case in point is the alpha-numeric auto-generated code. In Oracle,…
-
MySQL Administration Commands
Backup MySQL Database into a File -bash-3.2$mysqldump -ujhondoe -p mydb_name > mydb_name_backup.sql password: -bash-3.2$ zip mydb_name_backup.zip mydb_name_backup.sql Load MySQL Backup Into Database -bash-3.2$mysql -ujhondoe mydb_name < mydb_name_backup.sql password: Create User in MySQL mysql> CREATE USER ‘jhondoe’@'localhost’ IDENTIFIED BY ‘mypassword’; mysql> GRANT ALL PRIVILEGES ON mydbname.* TO ‘jhondoe’@'localhost’ WITH GRANT OPTION; mysql> CREATE USER ‘jhondoe’@'%’ IDENTIFIED…
Recent Comments