VectorLinux
October 02, 2014, 08:08:40 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: mysql/wordpress install problem (SOLVED)  (Read 1828 times)
sledgehammer
Vectorian
****
Posts: 1424



« on: July 27, 2013, 11:59:19 pm »

I have downloaded mysql 5.5.25-i586-2vl70 from gslapt.  Here is what I get, whether root or not:

Quote
vector://var/run/mysqld
root:# mysql_install_db

FATAL ERROR: Could not find ./bin/my_print_defaults

If you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.

If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.

vector://var/run/mysqld

and

Quote
vector://var/run/mysqld
johwhi:$ mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
vector://var/run/mysqld
johwhi:$ mysqld
130728  1:18:27 [Warning] Can't create test file /var/lib/mysql/vector.lower-test
130728  1:18:27 [Warning] Can't create test file /var/lib/mysql/vector.lower-test
mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 13)
130728  1:18:27 [ERROR] Aborting

130728  1:18:27 [Note] mysqld: Shutdown complete

vector://var/run/mysqld
johwhi:$

In short, I need help here.  I looked at the 2008 extensive post on this forum, name escapes me, where Newt took someone through similar (and difficult) mysql problems but nothing there seems to get me up and running.

Does anyone have a clue?  I am trying to install wordpress and apparently it requires mysql.

I would most appreciate some pointers.

John

« Last Edit: July 28, 2013, 03:44:47 pm by sledgehammer » Logged

VL7.0 xfce4 Samsung RF511
hata_ph
Packager
Vectorian
****
Posts: 3257


-- Just being myself --


« Reply #1 on: July 28, 2013, 03:09:16 am »

check your /etc/rc.d/rc.mysqld...it will give you some instruction on how to configure mysql

Quote
#!/bin/sh
# Start/stop/restart mysqld.
#
# Copyright 2003  Patrick J. Volkerding, Concord, CA
# Copyright 2003  Slackware Linux, Inc., Concord, CA
# Copyright 2008  Patrick J. Volkerding, Sebeka, MN
#
# This program comes with NO WARRANTY, to the extent permitted by law.
# You may redistribute copies of this program under the terms of the
# GNU General Public License.

# To start MySQL automatically at boot, be sure this script is executable:
# chmod 755 /etc/rc.d/rc.mysqld

# Before you can run MySQL, you must have a database.  To install an initial
# database, do this as root:
#
#   mysql_install_db --user=mysql
#
# Note that the mysql user must exist in /etc/passwd, and the created files
# will be owned by this dedicated user.  This is important, or else mysql
# (which runs as user "mysql") will not be able to write to the database
# later (this can be fixed with 'chown -R mysql.mysql /var/lib/mysql').
#
# To increase system security, consider using "mysql_secure_installation"
# as well.  For more information on this tool, please read:
#   man mysql_secure_installation

# To allow outside connections to the database comment out the next line.
# If you don't need incoming network connections, then leave the line
# uncommented to improve system security.
SKIP="--skip-networking"

# Uncomment the next line to use Oracle's InnoDB plugin instead of the included XtraDB
#INNODB="--ignore-builtin-innodb --plugin-load=innodb=ha_innodb.so"

# Start mysqld:
mysqld_start() {
  if [ -x /usr/bin/mysqld_safe ]; then
    # If there is an old PID file (no mysqld running), clean it up:
    if [ -r /var/run/mysql/mysql.pid ]; then
      if ! ps axc | grep mysqld 1> /dev/null 2> /dev/null ; then
        echo "Cleaning up old /var/run/mysql/mysql.pid."
        rm -f /var/run/mysql/mysql.pid
      fi
    fi
    /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/run/mysql/mysql.pid $SKIP $INNODB &
  fi
}

# Stop mysqld:
mysqld_stop() {
  # If there is no PID file, ignore this request...
  if [ -r /var/run/mysql/mysql.pid ]; then
    killall mysqld
    # Wait at least one minute for it to exit, as we don't know how big the DB is...
    for second in 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 \
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 60 ; do
      if [ ! -r /var/run/mysql/mysql.pid ]; then
        break;
      fi
      sleep 1
    done
    if [ "$second" = "60" ]; then
      echo "WARNING:  Gave up waiting for mysqld to exit!"
      sleep 15
    fi
  fi
}

# Restart mysqld:
mysqld_restart() {
  mysqld_stop
  mysqld_start
}

case "$1" in
'start')
  mysqld_start
  ;;
'stop')
  mysqld_stop
  ;;
'restart')
  mysqld_restart
  ;;
*)
  echo "usage $0 start|stop|restart"
esac
Logged
sledgehammer
Vectorian
****
Posts: 1424



« Reply #2 on: July 28, 2013, 10:08:21 am »

Thanks hata_ph.

It might be working.  Perhaps my solution will be to get another server to handle wordpress.

Here is why I say that mysql might be working:

passwd shows:

Quote
mysql:x:27:27:MySQL:/var/lib/mysql:/bin/false

and perhaps I can start mysql:

Quote
vector://home/johwhi
root:# mysqld_start()
>

and:

Quote
vector:/~
johwhi:$ mysqld_start() {
>   if [ -x /usr/bin/mysqld_safe ]; then
>     # If there is an old PID file (no mysqld running), clean it up:
>     if [ -r /var/run/mysql/mysql.pid ]; then
>       if ! ps axc | grep mysqld 1> /dev/null 2> /dev/null ; then
>         echo "Cleaning up old /var/run/mysql/mysql.pid."
>         rm -f /var/run/mysql/mysql.pid
>       fi
>     fi
>     /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/run/mysql/mysql.pid $SKIP $INNODB &
>   fi
> }
vector:/~
johwhi:$

But I don't think its working right:

Quote
root:# ./rc.mysqld start
vector://etc/rc.d
root:# 130728 10:25:17 mysqld_safe Logging to '/var/lib/mysql/vector.linux.net.err'.
130728 10:25:17 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
130728 10:25:19 mysqld_safe mysqld from pid file /var/run/mysql/mysql.pid ended

vector://etc/rc.d

John



Logged

VL7.0 xfce4 Samsung RF511
MarkGrieveson
Vectorian
****
Posts: 531


« Reply #3 on: July 28, 2013, 11:52:23 am »

The way to start mysql is to run the following as root:  mysqld_safe

Or, another way to start it, which I find is better, is to use the Menu's "Run Program" program (Alt-F2), and run the command "gksu mysqld_safe", because then you don't have to contend with a terminal being perpetually open while it runs.  Just ensure you have gksu installed to do this.

ETA:  It can also be helpful too to have phpMyAdmin installed to better administer your mysql installation.  Just download it and put the phpMyAdmin folder in your webserver folder, being sure to change the ownership to your server (IE, if it's lighttpd, then change the ownership of the folder and files to lighttpd.)  Then access it by going to http://yourdomain/phpMyAdmin 
« Last Edit: July 28, 2013, 12:19:33 pm by MarkGrieveson » Logged

I am using VL7.0 standard with XFCE
sledgehammer
Vectorian
****
Posts: 1424



« Reply #4 on: July 28, 2013, 12:34:04 pm »

Thanks Mark,

But I think I have bigger problems:

Quote
vector://srv/httpd/htdocs/wordpress
root:# mysqld_safe
130728 13:56:27 mysqld_safe Logging to '/usr/data/vector.linux.net.err'.
130728 13:56:27 mysqld_safe Starting mysqld daemon with databases from /usr/data
130728 13:56:27 mysqld_safe mysqld from pid file /usr/data/vector.linux.net.pid ended
vector://srv/httpd/htdocs/wordpress
root:#

Also, for what its worth, gksu shows a dependency problem.  As does gksu-polkit.  I don't see phpmyadmin in the repositories.

Finally, US and Panama are tied near half-time.

John
Logged

VL7.0 xfce4 Samsung RF511
sledgehammer
Vectorian
****
Posts: 1424



« Reply #5 on: July 28, 2013, 03:30:24 pm »

Thanks to this wonderful forum, I am at the wordpress install screen!  First time I got that far.   So I guess I don't have mysql problems after all.  I will post if I have further problems.  Will wait til then to mark this "solved."

John
Logged

VL7.0 xfce4 Samsung RF511
sledgehammer
Vectorian
****
Posts: 1424



« Reply #6 on: July 28, 2013, 03:43:27 pm »

I am blogging away on my new wordpress site.  I will mark this thread solved.

Thanks again,

John
Logged

VL7.0 xfce4 Samsung RF511
MarkGrieveson
Vectorian
****
Posts: 531


« Reply #7 on: July 28, 2013, 04:04:13 pm »

Congratulations!

PS, phpMyAdmin isn't in the repositories.  It's just something I installed.  It's not necessary, though.
Logged

I am using VL7.0 standard with XFCE
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!