WebFaction
Community site: login faq

Hi Guys,

I am trying to install MySQL into the home directory. I am following these instructions from http://forum.webfaction.com/viewtopic.php?id=1781&p=1

# First, reserve a port number by going into the WebFaction control panel and creating a new app of type "Custom App listenting on port".

MY_PORT=PUT_THE_PORT_NUMBER_HERE

mkdir -p ~/mysql/.src ~/mysql/tmp
cd ~/mysql/.src/
# Download and extract the Mysql source code:
wget http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.51b.tar.gz/from/http://mirror.services.wisc.edu/mysql/
tar xf mysql-5.0.51b.tar.gz 
cd mysql-5.0.51b
./configure  --prefix=$HOME/mysql
make
# Go take a 30-minute break...
make install

cat > $HOME/mysql/my.cnf << EOF
[mysqld]
port=$MY_PORT
socket=$HOME/mysql/mysql.sock
basedir=$HOME/mysql
datadir=$HOME/mysql/data

[client]
port=$MY_PORT
socket=$HOME/mysql/mysql.sock
EOF

echo export PATH=$HOME/mysql/bin:$PATH >> ~/.bash_profile
source ~/.bash_profile

mysql_install_db --basedir=$HOME/mysql --datadir=$HOME/mysql/data --tmpdir=$HOME/mysql/tmp

# Start the MySQL Server:
cd $HOME/mysql; mysqld_safe --defaults-file=$HOME/mysql/my.cnf  &

# Choose a password for root:
mysqladmin -u root -P $MY_PORT -S $HOME/mysql/mysql.sock password "aPasswordForRoot"

SQL version trying to install: 5.1.56

Problem: When I try to execute the last instruction to choose a password I get this error

mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'

I have tried every possible solution that I could find on the net but none have worked. I have tried to set the privilages but that failed too. MySQL just wouldn't let me log into the database and change anything.

I believe that I missed a instruction somewhere and that's the reason why I am having this problem. So I want to uninstall everything and start again but I don't know how to uninstall mySQL. I have tried to kill the mysqld process but that fails too and get message like this this:

mysqld(30255): Operation not permitted

I'm not sure what to do next. I am new to this and any help would be greatly appretiated :-)

Thanks in advance.....

asked 21 May '11, 17:12

e singh
111
accept rate: 0%


You should check what mysqladmin you are using to be sure,

$ which mysqladmin

Is that the binary bundled with your new build or the system one?

Are you replacing -P $MY_PORT with the correct port?

To uninstall anything you build from source you simply delete the directory it was installed to.

permanent link

answered 21 May '11, 17:21

johns
5.4k412
accept rate: 23%

Hi John,

Thanks for the reply. I get ~/mysql/bin/mysqladmin from the "which mysqladmin" command. which is the coorect one.

And yes the port is correct. I have set the $MY_PORT and I have also tried replacing the port number with the $MY_PORT.

So, if I delete the mySql folder that should uninstall MySQLAdmin but what would happen to the mysqld process that is running.

(21 May '11, 17:29) e singh

You can check if the process is running and kill it manually with a tool like htop, (replace USERNAME with your username)

$ htop -u USERNAME

You may also submit a ticket so we can look directly at the issue.

(21 May '11, 17:41) johns

Thanks for that. That will certainly be useful one day. It only shows 1 task running which I guess was htop.

If you could have a look at it then that would be great. How do I submit a ticket?

Also, if the mysqld task is not running then how come when I try to run it, it says that there is already mysqld process running but I would be greatful if you could look at it. Thanks.

(21 May '11, 17:52) e singh

You may submit a ticket within the control panel. The process is outlined here,

http://docs.webfaction.com/user-guide/help.html#support-tickets

By looking directly we can give you more info.

(21 May '11, 17:59) johns

If installing a new MySQL instance, please use the instructions as shown here, which are updated and maintained to ensure that they work:

http://community.webfaction.com/questions/3838/compiling-a-private-mysql-installation-in-your-home-directory

permanent link

answered 05 Jan '12, 19:37

ryans ♦♦
5.0k103960
accept rate: 43%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×168

question asked: 21 May '11, 17:12

question was seen: 4,019 times

last updated: 05 Jan '12, 19:37

                              
WEBFACTION
REACH US
SUPPORT
LEGAL
© COPYRIGHT 2003-2021 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM