Installing mysqld on Dreamhost VPS « How to Get it Working

If you do not already know, PS MySQL is useless! It’s basically a MySQL installation on a VPS where you have control over nothing! The only thing you have is assured memory allocation, which is pretty much useless.

So how? Why not create another VPS and install mysqld on it! Seriously, it’s that simple, with that you get full control of your MySQL server, in a real VPS environment.

Simple steps!

ssh into your VPS

ssh [email protected]

where psXXXXX is your VPS server name, like PS23535 etc.

type the following commands to install mysql server and client

sudo apt-get install mysql-server
sudo apt-get install mysql-client

Note

All this point, your installation

may

fail, with errors like:


Can’t exec “/tmp/mysql-server-5.1.config.181101”: Permission denied at /usr/share/perl/5.10/IPC/Open3.pm line 168.
open2: exec of /tmp/mysql-server-5.1.config.181101 configure failed at /usr/share/perl5/Debconf/ConfModule.pm line 59

when you run:

sudo mount

you will see:

/dev/hdv1 on / type ufs (defaults)
none on /proc type proc (defaults)
none on /tmp type tmpfs (size=128m,mode=1777,nosuid,noexec,nodev)
none on /dev/pts type devpts (gid=5,mode=620)

you need

/dev/hdv1 on / type ufs (defaults)
none on /proc type proc (defaults)
none on /tmp type tmpfs (size=128m,mode=1777)
none on /dev/pts type devpts (gid=5,mode=620)

for your installation to run completely, without error.

Please submit a ticket to DH support, to request for the admin to mount /tmp folder without noexec. However, do note of the potential security issues, you may encounter.

Updates

: from

dlo

in the comment, the default apt-get with DH will install only version 5.0, to get 5.1 while maintaining future update compatibility, simply:

sudo apt-get -t lenny-backports install mysql-server-5.1

Along with the pins in /etc/apt/preferences, this should allow you to keep it updated into the future. lenny-backports is already configured by DH in /etc/apt/sources.list by default.

Add Note
Verified: If you are on a new VPS, it is quite possible that your /etc/apt/preferences and /etc/apt/sources.list are not update or correctly configured for lenny-backports.

In /etc/apt/sources.list you will need to comment out the following line by adding a “#” in the beginning of the line

COMMENT OUT:

#deb http://www.backports.org/debian/ lenny-backports main

then ADD:

deb http://mirror.newdream.net/debian-backports/ lenny-backports main contrib non-free

In /etc/apt/preferences

APPEND:

Package: *

Pin: release a=lenny

Pin-Priority: 500

Package: *
Pin: release a=lenny-backports
Pin-Priority: 200

Package: emacs23
Pin: release a=lenny-backports
Pin-Priority: 900

Package: emacs23-common
Pin: release a=lenny-backports
Pin-Priority: 900

Package: debian-backports-keyring
Pin: release a=lenny-backports
Pin-Priority: 900

if you want to setup for remote access, do the follow:

sudo vi /etc/mysql/my.conf

look for bind-address and change to:

bind-address = psXXXXX.dreamhostps.com

again where psXXXXX is your VPS server name.

mysql -u root -p

then enter your password,

mysql> CREATE DATABASE your_new_database_name;
mysql> CREATE USER ‘newusr’@’psXXXXX.dreamhostps.com’ IDENTIFIED BY ‘your_password’;
mysql> GRANT ALL PRIVILEGES ON *.* TO ‘newusr’@’psXXXXX.dreamhostps.com’ WITH GRANT OPTION;
mysql> CREATE USER ‘newusr’@’%’ IDENTIFIED BY ‘your_password’;
mysql> GRANT ALL PRIVILEGES ON *.* TO ‘newusr’@’%’ WITH GRANT OPTION;

your mysql database user with username ‘newusr’ can now connect from any remote host, since using wildcard “%”.
just change “%” to a specified hostname if you are having a web application connecting to this database from say dreamhost shared hosting, with “%.dreamhost.com” or “%.dreamhostps.com”

alright! written in a bit of a rush cause i wasted many hours trying to install with much complicated methods! gosh*

Source

Be the first to comment

Leave a Reply

Your email address will not be published.


*