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? Here’s what they say about themselves.

ComfortHost.NET have been here since 2004 offer high quality web hosting solutions. All SpotVPS nodes are fully owned hardware and are colocated. All servers used by SpotVPS have been bought with internal cash. Our only monthly cost for these servers are the actual colocation. We are financially healthy and profitable since day one. We are NOT going out of buisness any time soon. We are in it for the long run!

ComfortHost on http://www.webhostingtalk.com/showthread.php?t=1110770

Here’s the plan that I got.
$6.99/mo Ultimate Plan
Memory: 2048mb (2gb)
HD Space: 50gb (50,000mb)
Bandwidth: 1,000gb (1TB)
Monthly Price: $6.99/mo
Setup Fee: FREE!
FREE GIGABIT PORT – FREE WEEKLY BACKUPS – FREE HARDWARE RAID
Location: Orlando, FL at DimeNOC
Test IP Address: 72.29.87.105

2GB RAM for $6.99. That’s sweet. Want to try it yourself? ORDER NOW

Word of caution,though. This plan (and all other dirt-cheap vps that I know of) comes with very limited support. You are usually given your VPS, IP and OS install and you have to do the rest. I installed mine with NGiNx, PHP, MySQL and it’s already up and running for 7 days straight now.

Here’s the result of the test I made on my VPS.

[root@vps ~]# dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync
16384+0 records in
16384+0 records out
1073741824 bytes (1.1 GB) copied, 14.9939 seconds, 71.6 MB/s

[root@vps ~]# wget cachefly.cachefly.net/100mb.test
--2011-11-24 18:10:35-- http://cachefly.cachefly.net/100mb.test
Resolving cachefly.cachefly.net... 205.234.175.175
Connecting to cachefly.cachefly.net|205.234.175.175|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 104857600 (100M) [application/octet-stream]
Saving to: `100mb.test'

100%[==============================================================================================================================>] 104,857,600 66.8M/s in 1.5s
2011-11-24 18:10:36 (66.8 MB/s) - `100mb.test' saved [104857600/104857600]

I’ll try to come up with a review together with my other hosting providers. :)

Incoming search terms:

  • spotvps
  • cachefly vps
  • comforthost spotvps
  • spotvps coupon
  • spotvps net
  • vps cachefly test
  • vps wget 10 mb test file

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 to start. The MySQL official website suggests(or at least, that’s how I understand it) that I recompile. I know I did not recompile before so after some fruitless googling, I finally found a working version. But first, thanks to remi for sharing the rpm.
[Read more...]

Incoming search terms:

  • upgrade mysql centos
  • mysql upgrade 5 0 to 5 5
  • update mysql centos
  • centos update mysql
  • centos upgrade mysql
  • mysql upgrade centos
  • mysql 5 0 to 5 5
  • upgrade mysql 5 0 to 5 5 centos
  • mysql 5 0 to 5 5 upgrade
  • yum update mysql 5 5

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.
[Read more...]

Incoming search terms:

  • mysql alter user
  • alter user change password mysql
  • oracle alter user set password
  • mysql alter user password
  • mysql alter user change password
  • mysql alter password
  • myphp user_password
  • how to set password for existing user in mysql
  • how to find password of an existing users in mysql
  • alter user password

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 'InnoDB' is disabled.
110514 14:04:22 [Note] Plugin 'FEDERATED' is disabled.
/usr/libexec/mysqld: Table 'mysql.plugin' doesn't exist
110514 14:04:22 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
110514 14:04:22 [ERROR] Unknown/unsupported storage engine: InnoDB
110514 14:04:22 [ERROR] Aborting

Initially, I thought the problem was on the mysql_upgrade part because that’s the first error that appears on the log. Apparently, that’s just a warning message because the service still managed to proceed to the next step which is for the InnoDB. And based on the log, it failed to start and actually aborted. So that’s where I should concentrate my investigation/trial-and-error.

Solution

I opened /etc/my.cnf and comment out skip-innodb and then restart mysqld. It fixed the problem and mysql managed to start. I then proceeded with the mysql_upgrade which is unrelated to the error.

Another solution for this is to set the default storage to other than InnoDB. However, I haven’t tried that myself.

Incoming search terms:

  • mysql daemon failed to start
  • mysql daemon failed to start centos
  • Unknown/unsupported storage engine: InnoDB
  • mysql failed to start
  • mysql upgrade failed
  • unknown/unsupported storage engine: innodb centos
  • mysql daemon failed to start after update
  • mysql upgrade 5 1 to 5 5 mysql daemon failed to start
  • mysql start failed log
  • mysql restart failed

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..
[Read more...]

Incoming search terms:

  • mysql dump reload
  • mysqldump reload
  • mysql reload
  • dump reload mysql
  • mysql dump and reload
  • nginx mysqldump 502 bad gateway
  • reload mysql
  • reload mysql dump
  • reload mysqldump
  • mysqldump and

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);

[Read more...]

Incoming search terms:

  • mysql sysdate
  • add_months in mysql
  • mysql months_between
  • mysql trunc date
  • mysql add_months
  • add_months mysql
  • sysdate in mysql
  • mysql trunc date function
  • trunc function in mysql;
  • mysql truncate date to month

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.
[Read more...]

Incoming search terms:

  • centos mysql password
  • reset mysql root password centos
  • reset mysql password centos
  • centos reset mysql root password
  • how to reset mysql root password in centos
  • how to recover mysql root password centos
  • how to change mysql password in centos
  • centos 6 reset mysql password
  • mysql forgot root centos
  • mysql centos root password

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 I reckon it would have the same results. That is to return the same data type as that of expr1. Another important thing to remember is that expr1 and expr2 should have the same data type

Incoming search terms:

  • nvl mysql
  • mysql nvl equivalent
  • nvl in mysql
  • mysql nvl
  • oracle nvl mysql
  • nvl equivalent in mysql
  • mysql nvl equivalent function
  • mysql аналог nvl
  • oracle nvl
  • NVL Oracle

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, it’s easy to generate AA123, AA124, AA125, etc., etc. All we have to do is concat the alpha part (AA) and with the nextval of sequence. For MySQL, the alpha part and the numeric part have to be saved in separate fields.

However, Maresa of Microshell has created an alternative solution for it. The article discusses a way to emulate the nextval function in mysql. It a nutshell, they created a table similar to the all_sequences of Oracle. This is where you insert your sequences. Then, create a function named nextval() function which increments and returns value of the sequence.
You can check the procedure here.

It’s pretty neat, actually. It’s an excellent alternative and you can even create similar functions like currval(), prevval(), among others. However, I have some reservations on his approach especially on the issue of concurrency. You see in Oracle, calling the nextval() will increment the value and that’s already persisted (saved) in the sequence table even without saving your query/dml statement. On this approach, other queries accessing the pseudo-nextval will have to wait until your query finishes. Not a good idea.

So for now, I’ll will still have to make do with whatever MySQL is providing. If there’s any consolation, MySQL provides LAST_INSERT_ID() function in case you want to get the latest id inserted. See details here here.

So I’m just hoping that MySQL will implement an equivalent feature in the near future. With the imminent takeover by Oracle, I’m actually hoping that development of MySQL will push through and take a steam. We all know that the development of this widely used open-source database engine has been hampered ever since Sun bought it.

Sequence is a little feature. But little as it seems, it solves a lot of problems and helps improve code development time.

Incoming search terms:

  • mysql sequence nextval
  • mysql nextval
  • nextval in mysql
  • postgresql sequence equivalent in mysql
  • oracle sequence in mysql
  • oracle sequence equivalent in mysql
  • sequence alternative in mysql
  • mysql sequentions
  • mysql sequence procedure
  • emulating nextval function to get sequence in mysql

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 BY 'mypassword';
mysql> GRANT ALL PRIVILEGES ON mydbname.* TO 'monty'@'%' WITH GRANT OPTION;

Incoming search terms:

  • mysql administration commands
  • my sql administration command
  • mysql admin command
  • mysql database admin commands