# FreeBSD6.2 / Apache 2.2 / MySQL 5.0 / Headache 9.7



## Omega_Shadow (Aug 2, 2004)

I have been working on this server build for the last two weeks. I am tired. I am aggrivated. I am in need of a beer and a few days rest.

FreeBSD was installed easly. Apache took a little more time but did not put up a fight. MySQL fought me every step of the way, but now that it is finaly installed only one thing stands in my way: Finding out how to use the damn thing.

As of right now it won't even start up. All I get is this:

```
[[email protected] /]# /usr/local/bin/mysqld_safe &
[1] 5265
[[email protected] /]# Starting mysqld daemon with databases from /var/db/mysql
STOPPING server from pid file /var/db/mysql/theta.outpostpaintball.com.pid
071113 20:05:13  mysqld ended
```
And besides that I don't know how to make usernames/passwords for the databases, how to make the databases themselves or any of the settings for that matter

Anyone got a crash course on this stuff that can at least get this running for the time being. I got one killer headache and would like to get out of ssh for a while


----------



## tomdkat (May 6, 2006)

First, locate the MySQL error log file and see what it says about why the server didn't start. MySQL can be a real pain in the rear to get up and running. I feel your pain. 

EDIT: Here are some HOWTO links that might help:

http://www.google.com/search?q=MySQ...s=org.mozilla:en-US:official&client=firefox-a

Peace...


----------



## Omega_Shadow (Aug 2, 2004)

Well, deffinately looks like a problem. Something about the port it needs is already in use. How do I find out what is using that port?

BTW, here is the error log:

```
071108 16:40:03  mysqld started
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
071108 16:40:03  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
071108 16:40:04  InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
071108 16:40:04  InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
071108 16:40:04  InnoDB: Started; log sequence number 0 0
071108 16:40:04 [Note] /usr/local/libexec/mysqld: ready for connections.
Version: '5.0.45'  socket: '/tmp/mysql.sock'  port: 3306  FreeBSD port: mysql-server-5.0.45_1
071108 17:01:29 [Note] /usr/local/libexec/mysqld: Normal shutdown

071108 17:01:29  InnoDB: Starting shutdown...
071108 17:01:31  InnoDB: Shutdown completed; log sequence number 0 43655
071108 17:01:31 [Note] /usr/local/libexec/mysqld: Shutdown complete

071108 17:01:31  mysqld ended

071108 17:02:47  mysqld started
071108 17:02:49  InnoDB: Started; log sequence number 0 43655
071108 17:02:49 [Note] /usr/local/libexec/mysqld: ready for connections.
Version: '5.0.45'  socket: '/tmp/mysql.sock'  port: 3306  FreeBSD port: mysql-server-5.0.45_1
071108 17:15:44 [Note] /usr/local/libexec/mysqld: Normal shutdown

071108 17:15:44  InnoDB: Starting shutdown...
071108 17:15:45  InnoDB: Shutdown completed; log sequence number 0 43655
071108 17:15:45 [Note] /usr/local/libexec/mysqld: Shutdown complete

071108 17:15:45  mysqld ended

071108 17:17:00  mysqld started
071108 17:17:02  InnoDB: Started; log sequence number 0 43655
071108 17:17:02 [Note] /usr/local/libexec/mysqld: ready for connections.
Version: '5.0.45'  socket: '/tmp/mysql.sock'  port: 3306  FreeBSD port: mysql-server-5.0.45_1
071108 17:25:53 [Note] /usr/local/libexec/mysqld: Normal shutdown

071108 17:25:53  InnoDB: Starting shutdown...
071108 17:25:55  InnoDB: Shutdown completed; log sequence number 0 43655
071108 17:25:55 [Note] /usr/local/libexec/mysqld: Shutdown complete

071108 17:25:55  mysqld ended

071108 17:27:09  mysqld started
071108 17:27:10  InnoDB: Started; log sequence number 0 43655
071108 17:27:10 [Note] /usr/local/libexec/mysqld: ready for connections.
Version: '5.0.45'  socket: '/tmp/mysql.sock'  port: 3306  FreeBSD port: mysql-server-5.0.45_1
071108 17:35:08 [Note] /usr/local/libexec/mysqld: Normal shutdown

071108 17:35:08  InnoDB: Starting shutdown...
071108 17:35:09  InnoDB: Shutdown completed; log sequence number 0 43655
071108 17:35:09 [Note] /usr/local/libexec/mysqld: Shutdown complete

071108 17:35:09  mysqld ended

071108 17:36:24  mysqld started
071108 17:36:26  InnoDB: Started; log sequence number 0 43655
071108 17:36:26 [Note] /usr/local/libexec/mysqld: ready for connections.
Version: '5.0.45'  socket: '/tmp/mysql.sock'  port: 3306  FreeBSD port: mysql-server-5.0.45_1
071109 15:51:06 [Note] /usr/local/libexec/mysqld: Normal shutdown

071109 15:51:06  InnoDB: Starting shutdown...
071109 15:51:08  InnoDB: Shutdown completed; log sequence number 0 43655
071109 15:51:08 [Note] /usr/local/libexec/mysqld: Shutdown complete

071109 15:51:08  mysqld ended

071109 15:52:23  mysqld started
071109 15:52:25  InnoDB: Started; log sequence number 0 43655
071109 15:52:26 [Note] /usr/local/libexec/mysqld: ready for connections.
Version: '5.0.45'  socket: '/tmp/mysql.sock'  port: 3306  FreeBSD port: mysql-server-5.0.45_1
071109 19:38:22 [Note] /usr/local/libexec/mysqld: Normal shutdown

071109 19:38:23  InnoDB: Starting shutdown...
071109 19:38:24  InnoDB: Shutdown completed; log sequence number 0 43655
071109 19:38:24 [Note] /usr/local/libexec/mysqld: Shutdown complete

071109 19:38:24  mysqld ended

071109 19:39:39  mysqld started
071109 19:39:41  InnoDB: Started; log sequence number 0 43655
071109 19:39:41 [Note] /usr/local/libexec/mysqld: ready for connections.
Version: '5.0.45'  socket: '/tmp/mysql.sock'  port: 3306  FreeBSD port: mysql-server-5.0.45_1
071109 22:13:21  mysqld started
071109 22:13:23  InnoDB: Started; log sequence number 0 43655
071109 22:13:24 [Note] /usr/local/libexec/mysqld: ready for connections.
Version: '5.0.45'  socket: '/tmp/mysql.sock'  port: 3306  FreeBSD port: mysql-server-5.0.45_1
071113 19:25:48  mysqld started
071113 19:25:48  InnoDB: Started; log sequence number 0 43655
071113 19:25:48 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
071113 19:25:48 [ERROR] Do you already have another mysqld server running on port: 3306 ?
071113 19:25:48 [ERROR] Aborting

071113 19:25:48  InnoDB: Starting shutdown...
071113 19:25:51  InnoDB: Shutdown completed; log sequence number 0 43655
071113 19:25:51 [Note] /usr/local/libexec/mysqld: Shutdown complete

071113 19:25:51  mysqld ended

071113 19:28:28  mysqld started
071113 19:28:28  InnoDB: Started; log sequence number 0 43655
071113 19:28:28 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
071113 19:28:28 [ERROR] Do you already have another mysqld server running on port: 3306 ?
071113 19:28:28 [ERROR] Aborting

071113 19:28:28  InnoDB: Starting shutdown...
071113 19:28:30  InnoDB: Shutdown completed; log sequence number 0 43655
071113 19:28:30 [Note] /usr/local/libexec/mysqld: Shutdown complete

071113 19:28:30  mysqld ended

071113 20:04:44  mysqld started
071113 20:04:44  InnoDB: Started; log sequence number 0 43655
071113 20:04:44 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
071113 20:04:44 [ERROR] Do you already have another mysqld server running on port: 3306 ?
071113 20:04:44 [ERROR] Aborting

071113 20:04:44  InnoDB: Starting shutdown...
071113 20:04:46  InnoDB: Shutdown completed; log sequence number 0 43655
071113 20:04:46 [Note] /usr/local/libexec/mysqld: Shutdown complete

071113 20:04:46  mysqld ended

071113 20:05:10  mysqld started
071113 20:05:10  InnoDB: Started; log sequence number 0 43655
071113 20:05:10 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
071113 20:05:10 [ERROR] Do you already have another mysqld server running on port: 3306 ?
071113 20:05:10 [ERROR] Aborting

071113 20:05:10  InnoDB: Starting shutdown...
071113 20:05:13  InnoDB: Shutdown completed; log sequence number 0 43655
071113 20:05:13 [Note] /usr/local/libexec/mysqld: Shutdown complete

071113 20:05:13  mysqld ended

071114 16:03:06  mysqld started
071114 16:03:06  InnoDB: Started; log sequence number 0 43655
071114 16:03:06 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
071114 16:03:06 [ERROR] Do you already have another mysqld server running on port: 3306 ?
071114 16:03:06 [ERROR] Aborting

071114 16:03:06  InnoDB: Starting shutdown...
071114 16:03:08  InnoDB: Shutdown completed; log sequence number 0 43655
071114 16:03:08 [Note] /usr/local/libexec/mysqld: Shutdown complete

071114 16:03:08  mysqld ended
```


----------



## tomdkat (May 6, 2006)

Well, it looks like MySQL has been running but for some reason, something is trying to start it while it's already running (I'm seeing more "Starting" messages than "ended" or "shutdown" messages).

In any event, you can try using the "netstat -a" command to see what state port 3306 is in (listening vs connected or something). Based on that, you might be able to readily determine what is grabbing that port. Make sure there aren't any MySQL processes running (mysqld or safe_mysql, etc). Are you doing this on a production server or a test machine you can reboot without impacting anyone?

Peace...


----------



## Omega_Shadow (Aug 2, 2004)

This is a running server with websites on it. But if I dont got SQL running then it is useless anyway. I have rebooted but no go

this is the output of netstat

```
[[email protected] ~]# netstat -a
Active Internet connections (including servers)
Proto Recv-Q Send-Q  Local Address          Foreign Address        (state)
tcp4       0     52  192.168.1.210.ssh      192.168.1.250.1991     ESTABLISHED
tcp4       0      0  *.finger               *.*                    LISTEN
tcp4       0      0  *.login                *.*                    LISTEN
tcp4       0      0  *.shell                *.*                    LISTEN
tcp4       0      0  *.telnet               *.*                    LISTEN
tcp4       0      0  *.ftp                  *.*                    LISTEN
tcp4       0      0  localhost.smtp         *.*                    LISTEN
tcp4       0      0  *.ssh                  *.*                    LISTEN
tcp6       0      0  *.ssh                  *.*                    LISTEN
tcp4       0      0  *.3306                 *.*                    LISTEN
tcp4       0      0  *.*                    *.*                    CLOSED
tcp46      0      0  *.https                *.*                    LISTEN
tcp4       0      0  *.*                    *.*                    CLOSED
tcp46      0      0  *.http                 *.*                    LISTEN
tcp4       0      0  *.smux                 *.*                    LISTEN
tcp4       0      0  *.10000                *.*                    LISTEN
udp4       0      0  *.snmp                 *.*
udp4       0      0  *.10000                *.*
udp4       0      0  localhost.ntp          *.*
udp6       0      0  fe80:3::1.ntp          *.*
udp6       0      0  localhost.ntp          *.*
udp4       0      0  192.168.1.210.ntp      *.*
udp6       0      0  fe80:1::202:b3ff.ntp   *.*
udp6       0      0  *.ntp                  *.*
udp4       0      0  *.ntp                  *.*
udp4       0      0  *.syslog               *.*
udp6       0      0  *.syslog               *.*
Active UNIX domain sockets
Address  Type   Recv-Q Send-Q    Inode     Conn     Refs  Nextref Addr
ffffff002f81a780 stream      0      0 ffffff002b2889b0        0        0                                                      0 /tmp/mysql.sock
ffffff002f95b000 stream      0      0 ffffff002fb2f000        0        0                                                      0 /var/run/devd.pipe
ffffff002f81a3c0 dgram       0      0        0 ffffff002f81ac00        0 ffffff0                                              02f81a540
ffffff002f81a480 dgram       0      0        0 ffffff002f81acc0        0 ffffff0                                              02f81a840
ffffff002f81a540 dgram       0      0        0 ffffff002f81ac00        0 ffffff0                                              02f81ab40
ffffff002f81a840 dgram       0      0        0 ffffff002f81acc0        0                                                      0
ffffff002f81ab40 dgram       0      0        0 ffffff002f81ac00        0                                                      0
ffffff002f81ac00 dgram       0      0 ffffff002e2abd90        0 ffffff002f81a3c0                                                      0 /var/run/logpriv
ffffff002f81acc0 dgram       0      0 ffffff002e4cc000        0 ffffff002f81a480                                                      0 /var/run/log
```


----------



## tomdkat (May 6, 2006)

Ok, this line means a process is actually *listening* on port 3306:

tcp4 0 0 *.3306 *.* LISTEN

Would you post the list of running processes? Use either the "ps ax" command and if "ax" isn'tt valid on FreeBSD try the "ps -ef" command.

Peace...


----------



## Omega_Shadow (Aug 2, 2004)

Here you go


```
[[email protected] ~]# ps ax
  PID  TT  STAT      TIME COMMAND
    0  ??  WLs    0:00.00 [swapper]
    1  ??  ILs    0:00.00 /sbin/init --
    2  ??  DL     0:00.14 [g_event]
    3  ??  DL     0:00.18 [g_up]
    4  ??  DL     0:00.20 [g_down]
    5  ??  DL     0:00.00 [acpi_task_0]
    6  ??  DL     0:00.00 [acpi_task_1]
    7  ??  DL     0:00.00 [acpi_task_2]
    8  ??  DL     0:00.00 [kqueue taskq]
    9  ??  DL     0:00.00 [thread taskq]
   10  ??  RL   148:18.10 [idle]
   11  ??  WL     0:00.02 [swi1: net]
   12  ??  WL     0:04.25 [swi4: clock sio]
   13  ??  WL     0:00.00 [swi3: vm]
   14  ??  DL     0:00.12 [yarrow]
   15  ??  WL     0:00.00 [swi6: Giant taskq]
   16  ??  WL     0:00.00 [swi6: task queue]
   17  ??  WL     0:00.00 [swi2: cambio]
   18  ??  WL     0:00.00 [swi5: +]
   19  ??  WL     0:00.00 [irq9: acpi0]
   20  ??  WL     0:00.03 [irq16: fxp0]
   21  ??  WL     0:00.00 [irq20: atapci0]
   22  ??  WL     0:00.04 [irq14: ata0]
   23  ??  WL     0:00.00 [irq15: ata1]
   24  ??  WL     0:00.00 [irq21: uhci0 uhci*]
   25  ??  DL     0:00.00 [usb0]
   26  ??  DL     0:00.00 [usbtask]
   27  ??  DL     0:00.00 [usb1]
   28  ??  DL     0:00.00 [usb2]
   29  ??  DL     0:00.00 [usb3]
   30  ??  DL     0:00.00 [usb4]
   31  ??  DL     0:00.02 [fdc0]
   32  ??  WL     0:00.00 [irq7: ppc0]
   33  ??  WL     0:00.00 [swi0: sio]
   34  ??  WL     0:00.00 [irq1: atkbd0]
   35  ??  DL     0:00.00 [pagedaemon]
   36  ??  DL     0:00.00 [vmdaemon]
   37  ??  DL     0:00.29 [pagezero]
   38  ??  DL     0:00.02 [bufdaemon]
   39  ??  DL     0:00.02 [vnlru]
   40  ??  DL     0:00.10 [syncer]
   41  ??  DL     0:00.04 [softdepflush]
   42  ??  DL     0:00.25 [schedcpu]
  495  ??  Is     0:00.00 /sbin/devd
  551  ??  Ss     0:00.02 /usr/sbin/syslogd -s
  633  ??  Ss     0:00.18 /usr/sbin/ntpd -c /etc/ntp.conf -p /var/run/ntpd.pid -f /var/db/ntpd.drift
  653  ??  Ss     0:00.01 /usr/sbin/usbd
  662  ??  Ss     0:00.09 /usr/local/bin/perl /usr/local/lib/webmin/miniserv.pl /usr/local/etc/webmin/miniserv.conf
  671  ??  S      0:00.13 /usr/local/sbin/snmpd -p /var/run/snmpd.pid
  706  ??  Ss     0:00.89 /usr/local/sbin/httpd -DSSL -DNOHTTPACCEPT
  718  ??  Is     0:00.00 /usr/sbin/sshd
  724  ??  Ss     0:00.10 sendmail: accepting connections (sendmail)
  728  ??  Is     0:00.00 sendmail: Queue [email protected]:30:00 for /var/spool/clientmqueue (sendmail)
  734  ??  Is     0:00.02 /usr/sbin/cron -s
  759  ??  Is     0:00.00 /usr/sbin/inetd -wW -C 60
  785  ??  I      0:00.03 /usr/local/sbin/httpd -DSSL -DNOHTTPACCEPT
  786  ??  I      0:00.07 /usr/local/sbin/httpd -DSSL -DNOHTTPACCEPT
  787  ??  I      0:00.01 /usr/local/sbin/httpd -DSSL -DNOHTTPACCEPT
  788  ??  I      0:00.04 /usr/local/sbin/httpd -DSSL -DNOHTTPACCEPT
  789  ??  I      0:00.04 /usr/local/sbin/httpd -DSSL -DNOHTTPACCEPT
  794  ??  Ss     0:00.05 sshd: [email protected] (sshd)
  800  ??  I      0:00.15 /usr/local/sbin/httpd -DSSL -DNOHTTPACCEPT
  801  ??  I      0:00.01 /usr/local/sbin/httpd -DSSL -DNOHTTPACCEPT
  802  ??  I      0:00.20 /usr/local/sbin/httpd -DSSL -DNOHTTPACCEPT
  803  ??  I      0:00.05 /usr/local/sbin/httpd -DSSL -DNOHTTPACCEPT
 1112  ??  I      0:00.00 /usr/local/sbin/httpd -DSSL -DNOHTTPACCEPT
  777  v0  Is+    0:00.00 /usr/libexec/getty Pc ttyv0
  778  v1  Is+    0:00.00 /usr/libexec/getty Pc ttyv1
  779  v2  Is+    0:00.00 /usr/libexec/getty Pc ttyv2
  780  v3  Is+    0:00.00 /usr/libexec/getty Pc ttyv3
  781  v4  Is+    0:00.00 /usr/libexec/getty Pc ttyv4
  782  v5  Is+    0:00.00 /usr/libexec/getty Pc ttyv5
  783  v6  Is+    0:00.00 /usr/libexec/getty Pc ttyv6
  784  v7  Is+    0:00.00 /usr/libexec/getty Pc ttyv7
  679 con- I      0:00.01 /bin/sh /usr/local/bin/mysqld_safe --defaults-extra-file=/var/db/mysql/my.cnf --user=mysql --datadi
  704 con- S      0:03.95 /usr/local/libexec/mysqld --defaults-extra-file=/var/db/mysql/my.cnf --basedir=/usr/local --datadir
  797  p0  Ss     0:00.01 -bash (bash)
 1132  p0  R+     0:00.00 ps ax
```


----------



## tomdkat (May 6, 2006)

Thanks! These two lines mean MySQL is running:


```
679 con- I      0:00.01 /bin/sh /usr/local/bin/mysqld_safe --defaults-extra-file=/var/db/mysql/my.cnf --user=mysql --datadi
  704 con- S      0:03.95 /usr/local/libexec/mysqld --defaults-extra-file=/var/db/mysql/my.cnf --basedir=/usr/local --datadir
```
If this is the process list after a reboot, that means MySQL *is* starting when the system starts, which is a good thing.

Now that MySQL is installed and running, you might want to go through the post installation procedure described here or follow the post-install steps in the MySQL on FreeBSD HOWTOs I linked to above.

Peace...


----------



## Omega_Shadow (Aug 2, 2004)

thats the problem. I don't think it is running. I attempted to run the very first instuction on the page you gave me and I got nothing. Well, something but not what I want....

*password changed for obvious reasons

```
[[email protected] ~]# mysql_install_db
Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/local/bin/mysqladmin -u root password 'new-password'
/usr/local/bin/mysqladmin -u root -h theta.outpostpaintball.com password 'new-password'
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr/local ; /usr/local/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/local/bin/mysqlbug script!

The latest information about MySQL is available on the web at
[url]http://www.mysql.com[/url]
Support MySQL by buying support/licenses at [url]http://shop.mysql.com[/url]
You have new mail in /var/mail/root
[[email protected] ~]# /usr/local/bin/mysqladmin -u root 12345 '12345'
[COLOR="Red"][B]/usr/local/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists![/B][/COLOR]
[[email protected] ~]#
```
Now eather it is not running or it is not set up correctly. Any suggestions?


----------



## tomdkat (May 6, 2006)

Ok, if the MySQL server wasn't running, I believe the mysql_install_db command would have issued some messages. So, do this:

1) Confirm the MySQL server is running: ps -ef | grep mysqld
2) If it's not running, start it: /usr/local/bin/mysqld_safe &
3) Repeat step #1, if the server isn't running now, post the MySQL error log file contents here.
4) If the server IS now running, issue your mysqladmin command

If the server IS running, make sure /tmp/mysql.sock exists. mysqld might be creating it's Unix socket somewhere else.

Peace...


----------



## Omega_Shadow (Aug 2, 2004)

/tmp/mysql.sock doesnt exist. How would I go about creating it?


----------



## tomdkat (May 6, 2006)

Omega_Shadow said:


> /tmp/mysql.sock doesnt exist. How would I go about creating it?


So, you're saying the "ps -ef | grep mysqld" command shows MySQL IS running but /tmp/mysql.sock doesn't exist? To make sure this is the case, please post the output from the following commands:

$ ps -ef | grep mysqld
$ ls -l /tmp/mysql*
$ tail -n50 [/path/to/mysql/error/log]

Sorry for having to ask for all this output but I'm not at the console to run these commands myself. 

Peace...


----------



## Omega_Shadow (Aug 2, 2004)

Ok, New day. New Bottle of Excedrin. New Problems 

Don't mind typing out all the output 'cause there wasn't much:

```
[[email protected] /]# ps -ef | grep mysqld
ps: Process environment requires procfs(5)
[[email protected] /]# ls -l /tmp/mysql*
ls: /tmp/mysql*: No such file or directory
[[email protected] /]# tail -n50 /var/db/mysql/theta.****.com.err
071113 20:05:13  mysqld ended

071114 16:03:06  mysqld started
071114 16:03:06  InnoDB: Started; log sequence number 0 43655
071114 16:03:06 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
071114 16:03:06 [ERROR] Do you already have another mysqld server running on port: 3306 ?
071114 16:03:06 [ERROR] Aborting

071114 16:03:06  InnoDB: Starting shutdown...
071114 16:03:08  InnoDB: Shutdown completed; log sequence number 0 43655
071114 16:03:08 [Note] /usr/local/libexec/mysqld: Shutdown complete

071114 16:03:08  mysqld ended

071114 16:16:09 [Note] /usr/local/libexec/mysqld: Normal shutdown

071114 16:16:09  InnoDB: Starting shutdown...
071114 16:16:11  InnoDB: Shutdown completed; log sequence number 0 43655
071114 16:16:11 [Note] /usr/local/libexec/mysqld: Shutdown complete

071114 16:16:11  mysqld ended

071114 16:17:27  mysqld started
071114 16:17:29  InnoDB: Started; log sequence number 0 43655
071114 16:17:29 [Note] /usr/local/libexec/mysqld: ready for connections.
Version: '5.0.45'  socket: '/tmp/mysql.sock'  port: 3306  FreeBSD port: mysql-server-5.0.45_1
071114 16:22:31  mysqld started
071114 16:22:32  InnoDB: Started; log sequence number 0 43655
071114 16:22:32 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
071114 16:22:32 [ERROR] Do you already have another mysqld server running on port: 3306 ?
071114 16:22:32 [ERROR] Aborting

071114 16:22:32  InnoDB: Starting shutdown...
071114 16:22:34  InnoDB: Shutdown completed; log sequence number 0 43655
071114 16:22:34 [Note] /usr/local/libexec/mysqld: Shutdown complete

071114 16:22:34  mysqld ended

071115 15:50:28  mysqld started
071115 15:50:28  InnoDB: Started; log sequence number 0 43655
071115 15:50:28 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
071115 15:50:28 [ERROR] Do you already have another mysqld server running on port: 3306 ?
071115 15:50:28 [ERROR] Aborting

071115 15:50:28  InnoDB: Starting shutdown...
071115 15:50:30  InnoDB: Shutdown completed; log sequence number 0 43655
071115 15:50:30 [Note] /usr/local/libexec/mysqld: Shutdown complete

071115 15:50:30  mysqld ended

[[email protected] /]#
```
I screwed up when I installed SQL, didnt I?


----------



## tomdkat (May 6, 2006)

Omega_Shadow said:


> Ok, New day. New Bottle of Excedrin. New Problems






> I screwed up when I installed SQL, didnt I?


Thanks for the output. Naw, I don't think you necessarily screwed up the MySQL install. I just need to give you better commands to type. 

Ok, here is what I want you to do:

1) Reboot the server
2) Once the server has booted login and run these commands:

# ps ax | grep mysql
# ls -l /tmp/mysql*
# tail -n50 tail -n50 /var/db/mysql/theta.****.com.err

Post the output here. Something is trying to start MySQL once it's already running. What the above sequence will do is confirm MySQL is running when the system starts (which I believe is what is already happening) and then look to see if the Unix socket is being created in the spot where the log indicates it's being created.

Thanks!

Peace...


----------



## Omega_Shadow (Aug 2, 2004)

Here it is:

```
[[email protected] ~]# ps ax | grep mysql
  679 con- I      0:00.01 /bin/sh /usr/local/bin/mysqld_safe --defaults-extra-f
  704 con- S      0:00.12 /usr/local/libexec/mysqld --defaults-extra-file=/var/
[[email protected] ~]# ls -l /tmp/mysql*
srwxrwxrwx  1 mysql  wheel  0 Nov 21 15:52 /tmp/mysql.sock
[[email protected] ~]# tail -n50 tail -50 /var/db/mysql/theta.*****.com.err
tail: tail: No such file or directory
tail: -50: No such file or directory
==> /var/db/mysql/theta.*****.com.err <==
071114 16:03:08  mysqld ended

071114 16:16:09 [Note] /usr/local/libexec/mysqld: Normal shutdown

071114 16:16:09  InnoDB: Starting shutdown...
071114 16:16:11  InnoDB: Shutdown completed; log sequence number 0 43655
071114 16:16:11 [Note] /usr/local/libexec/mysqld: Shutdown complete

071114 16:16:11  mysqld ended

071114 16:17:27  mysqld started
071114 16:17:29  InnoDB: Started; log sequence number 0 43655
071114 16:17:29 [Note] /usr/local/libexec/mysqld: ready for connections.
Version: '5.0.45'  socket: '/tmp/mysql.sock'  port: 3306  FreeBSD port: mysql-server-5.0.45_1
071114 16:22:31  mysqld started
071114 16:22:32  InnoDB: Started; log sequence number 0 43655
071114 16:22:32 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
071114 16:22:32 [ERROR] Do you already have another mysqld server running on port: 3306 ?
071114 16:22:32 [ERROR] Aborting

071114 16:22:32  InnoDB: Starting shutdown...
071114 16:22:34  InnoDB: Shutdown completed; log sequence number 0 43655
071114 16:22:34 [Note] /usr/local/libexec/mysqld: Shutdown complete

071114 16:22:34  mysqld ended

071115 15:50:28  mysqld started
071115 15:50:28  InnoDB: Started; log sequence number 0 43655
071115 15:50:28 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
071115 15:50:28 [ERROR] Do you already have another mysqld server running on port: 3306 ?
071115 15:50:28 [ERROR] Aborting

071115 15:50:28  InnoDB: Starting shutdown...
071115 15:50:30  InnoDB: Shutdown completed; log sequence number 0 43655
071115 15:50:30 [Note] /usr/local/libexec/mysqld: Shutdown complete

071115 15:50:30  mysqld ended

071121 15:51:28 [Note] /usr/local/libexec/mysqld: Normal shutdown

071121 15:51:28  InnoDB: Starting shutdown...
071121 15:51:31  InnoDB: Shutdown completed; log sequence number 0 43655
071121 15:51:31 [Note] /usr/local/libexec/mysqld: Shutdown complete

071121 15:51:31  mysqld ended

071121 15:52:49  mysqld started
071121 15:52:51  InnoDB: Started; log sequence number 0 43655
071121 15:52:52 [Note] /usr/local/libexec/mysqld: ready for connections.
Version: '5.0.45'  socket: '/tmp/mysql.sock'  port: 3306  FreeBSD port: mysql-server-5.0.45_1
[[email protected] ~]#
```


----------



## tomdkat (May 6, 2006)

Perfect! Thanks!

Now, let's take a looksee....



> [[email protected] ~]# ps ax | grep mysql
> 679 con- I 0:00.01 /bin/sh /usr/local/bin/mysqld_safe --defaults-extra-f
> 704 con- S 0:00.12 /usr/local/libexec/mysqld --defaults-extra-file=/var/


Ok, this means MySQL *is* running, which is good. 



> [[email protected] ~]# ls -l /tmp/mysql*
> srwxrwxrwx 1 mysql wheel 0 Nov 21 15:52 /tmp/mysql.sock
> [[email protected] ~]#


Ok, this means the Unix socket *was* successfully created, which is good. 



> tail -n50 tail -50 /var/db/mysql/theta.*****.com.err
> (snip)
> 071121 15:52:49 mysqld started
> 071121 15:52:51 InnoDB: Started; log sequence number 0 43655
> ...


This means MySQL is up, running, and ready to rock and roll, which is good. 

Ok, now run these commands and post the output here:

# /usr/local/bin/mysqladmin -u root 12345 '12345'
# tail -n50 /var/db/mysql/theta.*****.com.err

Thanks!

Peace...


----------



## Omega_Shadow (Aug 2, 2004)

Unknown command. That cant be good  And here I thought we were close to getting this done so I could install zencart


```
[[email protected] ~]# /usr/local/bin/mysqladmin -u root 12345 '12345'
/usr/local/bin/mysqladmin: Unknown command: '12345'
[[email protected] ~]# tail -n50 /var/db/mysql/theta.***.com.err
071114 16:03:08  mysqld ended

071114 16:16:09 [Note] /usr/local/libexec/mysqld: Normal shutdown

071114 16:16:09  InnoDB: Starting shutdown...
071114 16:16:11  InnoDB: Shutdown completed; log sequence number 0 43655
071114 16:16:11 [Note] /usr/local/libexec/mysqld: Shutdown complete

071114 16:16:11  mysqld ended

071114 16:17:27  mysqld started
071114 16:17:29  InnoDB: Started; log sequence number 0 43655
071114 16:17:29 [Note] /usr/local/libexec/mysqld: ready for connections.
Version: '5.0.45'  socket: '/tmp/mysql.sock'  port: 3306  FreeBSD port: mysql-server-5.0.45_1
071114 16:22:31  mysqld started
071114 16:22:32  InnoDB: Started; log sequence number 0 43655
071114 16:22:32 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
071114 16:22:32 [ERROR] Do you already have another mysqld server running on port: 3306 ?
071114 16:22:32 [ERROR] Aborting

071114 16:22:32  InnoDB: Starting shutdown...
071114 16:22:34  InnoDB: Shutdown completed; log sequence number 0 43655
071114 16:22:34 [Note] /usr/local/libexec/mysqld: Shutdown complete

071114 16:22:34  mysqld ended

071115 15:50:28  mysqld started
071115 15:50:28  InnoDB: Started; log sequence number 0 43655
071115 15:50:28 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
071115 15:50:28 [ERROR] Do you already have another mysqld server running on port: 3306 ?
071115 15:50:28 [ERROR] Aborting

071115 15:50:28  InnoDB: Starting shutdown...
071115 15:50:30  InnoDB: Shutdown completed; log sequence number 0 43655
071115 15:50:30 [Note] /usr/local/libexec/mysqld: Shutdown complete

071115 15:50:30  mysqld ended

071121 15:51:28 [Note] /usr/local/libexec/mysqld: Normal shutdown

071121 15:51:28  InnoDB: Starting shutdown...
071121 15:51:31  InnoDB: Shutdown completed; log sequence number 0 43655
071121 15:51:31 [Note] /usr/local/libexec/mysqld: Shutdown complete

071121 15:51:31  mysqld ended

071121 15:52:49  mysqld started
071121 15:52:51  InnoDB: Started; log sequence number 0 43655
071121 15:52:52 [Note] /usr/local/libexec/mysqld: ready for connections.
Version: '5.0.45'  socket: '/tmp/mysql.sock'  port: 3306  FreeBSD port: mysql-server-5.0.45_1
[[email protected] ~]#
```


----------



## tomdkat (May 6, 2006)

I think we're closer than you might think. 

Ok, let's try these commands to make sure mysqladmin can talk to the server:

# /usr/local/bin/mysqladmin version
# /usr/local/bin/mysqladmin variables

Post the output here. 

Peace...


----------



## tomdkat (May 6, 2006)

Ok, I gave you the wrong mysqladmin command to enter. Use this one instead:

# /usr/local/bin/mysqladmin -u root password '12345'

As always, post the output here. 

Thanks!

Peace...


----------



## Omega_Shadow (Aug 2, 2004)

no output. It just accepted it. I am guessing I changed my root password for sql (or created one?)


----------



## tomdkat (May 6, 2006)

Sweet! That means it worked!  Now, run this command:

# /usr/local/bin/mysqladmin -u root -h {servername} password '12345'

So, you've set the root password to '12345' (without the quotes) or whatever you replaced 12345 with.

Also, did you run the other two commands above:

# /usr/local/bin/mysqladmin version
# /usr/local/bin/mysqladmin variables

You don't need to post the output from those, at this point, but you *should* get something from them.

At this point, I believe you're ready to install the other app you needed to install. However, I *strongly* suggest you install the MySQL GUI tools or phpMyAdmin to make it a little easier to create databases, define other userids, etc.

At this point, MySQL is up and running on your box and the root password (for localhost) has been set. 

Peace...


----------



## Omega_Shadow (Aug 2, 2004)

Done and done. 

I use BSD with no GUI. I have heard of phpMyAdmin before but dont know how to use it. I installed it from ports but dont know what to do next.


----------



## tomdkat (May 6, 2006)

Ok, since you have no graphical console access to the server, you'll have to do all admin over the network (which is fine). To get phpMyAdmin setup, read the Quick Install information., Since you installed phpMyAdmin from "ports", some of the initial install stuff has probably been done for you already so see if you can start at step #4 to configure phpMyAdmin.

As for the MySQL GUI, did you install that on Windows or some other platform? Assuming (for now) you installed it on Windows, read this and this. Since you will need to connect to MySQL as root from a machine on the network, you will need to grant root access from that machine.

Before we get to that point, 


tomdkat said:


> Also, did you run the other two commands above:
> 
> # /usr/local/bin/mysqladmin version
> # /usr/local/bin/mysqladmin variables
> ...


Peace...


----------



## Omega_Shadow (Aug 2, 2004)

oh yeah, sorry bout that

```
[[email protected] /]# /usr/local/bin/mysqladmin version
/usr/local/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
[[email protected] /]# /usr/local/bin/mysqladmin variables
/usr/local/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
[[email protected] /]#
```


----------



## tomdkat (May 6, 2006)

Ah, ok those errors mean a password is required for you to login to MySQL as root. Maybe these commands would work better:

# /usr/local/bin/mysqladmin -p12345 version
# /usr/local/bin/mysqladmin -p12345 version

Try those and see if those errors go away. Of course, replace 12345 with the actual password. Try NOT putting a space between the "-p" and the password. The GOOD news is those errors above mean mysqladmin WAS able to get connected to mysqld and mysqld refused the login attempt. 

Peace...


----------



## Omega_Shadow (Aug 2, 2004)

First time I heard of an error being good news 


```
[[email protected] /]# /usr/local/bin/mysqladmin -p12345 version
/usr/local/bin/mysqladmin  Ver 8.41 Distrib 5.0.45, for portbld-freebsd6.2 on amd64
Copyright (C) 2000-2006 MySQL AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version          5.0.45
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /tmp/mysql.sock
Uptime:                 2 days 54 min 4 sec

Threads: 1  Questions: 17  Slow queries: 0  Opens: 12  Flush tables: 1  Open tables: 6  Queries per second avg: 0.000
[[email protected] /]# /usr/local/bin/mysqladmin variables

XXXXXXX OUTPUT TOO LARGE TO POST XXXXXXX

[[email protected] /]#
```


----------



## tomdkat (May 6, 2006)

Excellent!!!! Ok, now for the "fun" part.  We will need to grant access to MySQL for the user root from a non-localhost machine. So, you will need to get the IP address for the machine you will be running the MySQL GUI on.

If that is a Windows box, open a command prompt and enter the "ipconfig" command to get your IP address.

If that is a *nix box, try the "ifconfig" command (or whatever command you would use to get your IP address).

Once you have the IP address of the machine, run this command on the MySQL box:

# /usr/local/bin/mysqladmin -u root -h {servername} password '12345'

Replace {servername} with the IP address. Here is an example:

# /usr/local/bin/mysqladmin -u root -h 192.168.1.75 password '12345'

This allows root to login from machine 192.168.1.75 using password 12345.

You will need to enter that command and if you get no output back, you should be able to connect to MySQL using the MySQL GUI.

With regard to phpMyAdmin, since that will be running ON the same server as MySQL, you shouldn't have any MySQL login issues (famous last words ). Go through the Quick Install and Installation docs on the phpMyAdmin site.

Let me know how it goes. Now, I'm about to sign-out, grab some Thanksgiving leftovers for breakfast, and spin a movie before heading out to the car show. I'll resume this later this evening or tomorrow when I'm back.

The fact you're able to get connected to the MySQL server means a lot, so we ARE making progress. 

One last thing, if you will be the MySQL admin *get a MySQL book asap* as you WILL need it. 

Good luck! 

Peace...


----------



## Omega_Shadow (Aug 2, 2004)

The command came back with errors:

```
[[email protected] /]# /usr/local/bin/mysqladmin -u root -h {192.168.1.250} password '12345'
/usr/local/bin/mysqladmin: connect to server at '{192.168.1.250}' failed
error: 'Unknown MySQL server host '{192.168.1.250}' (3)'
Check that mysqld is running on {192.168.1.250} and that the port is 3306.
You can check this by doing 'telnet {192.168.1.250} 3306'
```
I realized I screwed up by putting the {} in there, but it looks like this command is telling it to connect to another server


----------



## tomdkat (May 6, 2006)

tomdkat said:


> Replace {servername} with the IP address. Here is an example:
> 
> # /usr/local/bin/mysqladmin -u root -h 192.168.1.75 password '12345'
> 
> ...


So, what happened when you entered this command:

# /usr/local/bin/mysqladmin -u root -h 192.168.1.250 password '12345'

Because you left the curly braces in the other command, mysqladmin was trying to connect to another server.

As an aside, a parameter within square brackets ([ ]) generally means that parameter is optional. One that is within curly braces generally means it is required. If BOTH cases, you specify the parameter without the brackets or braces. 

Run the command above, replace '12345' with the appropriate password (NO quotes) and then try to connect using the MySQL GUI again.

Peace...


----------



## Omega_Shadow (Aug 2, 2004)

I should have mentioned before that I tried it again without the braces almost imediately after I relized I was an imbicile and left the braces on.


```
[[email protected] ~]# /usr/local/bin/mysqladmin -u root -h 192.168.1.250 password ****
/usr/local/bin/mysqladmin: connect to server at '192.168.1.250' failed
error: 'Lost connection to MySQL server at 'reading initial communication packet', system error: 61'
[[email protected] ~]#
```


----------



## tomdkat (May 6, 2006)

Ok, when you connect *to* your MySQL server *from* the MySQL GUI, do you specify an IP address or the hostname 'theta.*****.com'?

Peace...


----------



## Omega_Shadow (Aug 2, 2004)

I specify the IP address of the server. If I doubt I could find it based on its local hostname from a remote location, but I am still learning all the ins and outs of advanced networking.


----------



## tomdkat (May 6, 2006)

Ok, then issue this command on the *MySQL server machine*:

# /usr/local/bin/mysqladmin -u root -h {IP address of MySQL server} password '12345'

The IP address you use in the above command is the IP address you specify in the MySQL GUI admin on Windows.

Post any error messages you might get. Try to connect from the MySQL GUI admin.

Peace...


----------



## Omega_Shadow (Aug 2, 2004)

```
[[email protected] ~]# /usr/local/bin/mysqladmin -u root -h 192.168.1.210 password ******
/usr/local/bin/mysqladmin: connect to server at '192.168.1.210' failed
error: 'Host '192.168.1.210' is not allowed to connect to this MySQL server'
[[email protected] ~]#
```


----------



## tomdkat (May 6, 2006)

Ok, we're gonna have to do this the manual way. 

Ok, on the MySQL server box, I want you to run this command:

# /usr/local/bin/mysql -u root -p

Enter the root password when prompted. At this point, you should have a "mysql>" prompt.

Then enter these commands:

mysql> *USE mysql;*
mysql> *SELECT * FROM user;*

Please post the output here. There should be 3 rows returned by that query.

I'm getting this procedure from chapter 8 on this page.

I built MySQL 5.0.45 from source on my machine and was able to recreate your latest mysqladmin problem. I WAS able to get around that using the procedure we'll follow now.

Peace...


----------



## Omega_Shadow (Aug 2, 2004)

In my experience the manual way is always the best way 


```
[[email protected] ~]# /usr/local/bin/mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.45 FreeBSD port: mysql-server-5.0.45_1

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> USE mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> SELECT * FROM user;
+----------------------------+------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+
| Host                       | User | Password                                  | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Show_db_priv | Super_priv | Create_tmp_table_priv | Lock_tables_priv | Execute_priv | Repl_slave_priv | Repl_client_priv | Create_view_priv | Show_view_priv | Create_routine_priv | Alter_routine_priv | Create_user_priv | ssl_type | ssl_cipher | x509_issuer | x509_subject | max_questions | max_updates | max_connections | max_user_connections |
+----------------------------+------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+
| localhost                  | root | *00A51F3F48415C7D4E8908980D443C29C69B60C9 | Y           | Y           | Y           | Y           | Y           | Y         | Y           | Y             | Y            | Y         | Y          | Y               | Y          | Y          | Y            | Y          | Y                     | Y                | Y            | Y               | Y                | Y                | Y              | Y                   | Y                  | Y                |          |            |             |              |             0 |           0 |               0 |                    0 |
| theta.outpostpaintball.com | root |                                           | Y           | Y           | Y           | Y           | Y           | Y         | Y           | Y             | Y            | Y         | Y          | Y               | Y          | Y          | Y            | Y          | Y                     | Y                | Y            | Y               | Y                | Y                | Y              | Y                   | Y                  | Y                |          |            |             |              |             0 |           0 |               0 |                    0 |
| 127.0.0.1                  | root |                                           | Y           | Y           | Y           | Y           | Y           | Y         | Y           | Y             | Y            | Y         | Y          | Y               | Y          | Y          | Y            | Y          | Y                     | Y                | Y            | Y               | Y                | Y                | Y              | Y                   | Y                  | Y                |          |            |             |              |             0 |           0 |               0 |                    0 |
+----------------------------+------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+
3 rows in set (0.00 sec)

mysql>
```


----------



## tomdkat (May 6, 2006)

Ok, then when you connect from the MySQL GUI, try specifying the hostname (theta.******.com) instead of the IP address of the MySQL server and see if you can get logged in.

Peace...


----------



## Omega_Shadow (Aug 2, 2004)

It did not connect but I am not surrprised. That is not a true host name. I named the server that only to stop it from constantly giving me the error about "non-standard host name" 

I am poking around trying to find the mysql command that will alow me to connect as root from a specific IP address. The IT termanal should be the only computer with that privlage in my eyes. The IT Termanal has a static ip so it should be easy to add it if I could only find the damn command


----------



## tomdkat (May 6, 2006)

Omega_Shadow said:


> It did not connect but I am not surrprised. That is not a true host name. I named the server that only to stop it from constantly giving me the error about "non-standard host name"


Right... 

Ok, then do this:

# mysql -u root -p
(enter password)
mysql> USE mysql;
mysql> UPDATE user SET Host = '192.168.1.210' WHERE Host = 'theta.outpostpaintball.com';
mysql> FLUSH PRIVILEGES; 
mysql> quit;

Now, you should be able to set the root password using this:

# mysqladmin -h 192.168.1.210 -u root password '12345'

Of course, change the IP address above to the correct one for the server.

Let me know what happens. 

Peace...


----------



## Omega_Shadow (Aug 2, 2004)

Letting you know I performed the following commands in hopes of getting this working


```
[[email protected] ~]# /usr/local/bin/mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.45 FreeBSD port: mysql-server-5.0.45_1

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> USE mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql>update user set host='192.168.1.250' where user='root' and host='theta.outpostpaintball.com';
flush privileges;
```
Still nota


----------



## Omega_Shadow (Aug 2, 2004)

Omega_Shadow said:


> Letting you know I performed the following commands in hopes of getting this working
> 
> 
> ```
> ...


EDIT: Looks like great minds think alike  Performing your commands now


----------



## tomdkat (May 6, 2006)

Ok, can you select everything from the user table for me:

mysql> SELECT * FROM user;

I need to run out to get my car but I'll be back shortly.

Peace...


----------



## tomdkat (May 6, 2006)

Omega_Shadow said:


> ```
> [[email protected] ~]# /usr/local/bin/mysqladmin -u root -h 192.168.1.210 password ******
> /usr/local/bin/mysqladmin: connect to server at '192.168.1.210' failed
> error: 'Host '192.168.1.210' is not allowed to connect to this MySQL server'
> ...


Hold on a minute. Is the IP address of the MySQL server 192.168.1.210 or 192.168.1.250? In the SQL update command, you need to specify the IP address of the MySQL server. In your last output, you specified 192.168.1.250 yet above you were using 192.168.1.210. Which address is correct?

Peace...


----------



## Omega_Shadow (Aug 2, 2004)

Confusion on my part. I thought I had to spessify the ip address of the computer I want to the mysql server to alow root access from, not the mysql server itself. I have made the nessisary changes and I am back on track with ya :up:

Server: 192.168.1.210
IT Term:192.168.1.250

I entered the commands like you had them, obviously substituting "theta.outpostpaintball.com" with "192.168.1.250" due to my pervious changing of that row


----------



## Omega_Shadow (Aug 2, 2004)

btw, here is the select user command output


```
mysql> select * from user;
+---------------+------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+
| Host          | User | Password                                  | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Show_db_priv | Super_priv | Create_tmp_table_priv | Lock_tables_priv | Execute_priv | Repl_slave_priv | Repl_client_priv | Create_view_priv | Show_view_priv | Create_routine_priv | Alter_routine_priv | Create_user_priv | ssl_type | ssl_cipher | x509_issuer | x509_subject | max_questions | max_updates | max_connections | max_user_connections |
+---------------+------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+
| localhost     | root | *00A51F3F48415C7D4E8908980D443C29C69B60C9 | Y           | Y           | Y           | Y           | Y           | Y         | Y           | Y             | Y            | Y         | Y          | Y               | Y          | Y          | Y            | Y          | Y                     | Y                | Y            | Y               | Y                | Y                | Y              | Y                   | Y                  | Y                |          |            |             |              |             0 |           0 |               0 |                    0 |
| 192.168.1.210 | root | *00A51F3F48415C7D4E8908980D443C29C69B60C9 | Y           | Y           | Y           | Y           | Y           | Y         | Y           | Y             | Y            | Y         | Y          | Y               | Y          | Y          | Y            | Y          | Y                     | Y                | Y            | Y               | Y                | Y                | Y              | Y                   | Y                  | Y                |          |            |             |              |             0 |           0 |               0 |                    0 |
| 127.0.0.1     | root |                                           | Y           | Y           | Y           | Y           | Y           | Y         | Y           | Y             | Y            | Y         | Y          | Y               | Y          | Y          | Y            | Y          | Y                     | Y                | Y            | Y               | Y                | Y                | Y              | Y                   | Y                  | Y                |          |            |             |              |             0 |           0 |               0 |                    0 |
+---------------+------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+
3 rows in set (0.00 sec)
```


----------



## tomdkat (May 6, 2006)

Ok, can you get connected now?

EDIT: From the MySQL GUI, I mean. 

Peace...


----------



## Omega_Shadow (Aug 2, 2004)

nope, still notta. Here is the exact error:


----------



## tomdkat (May 6, 2006)

Ok, what happens if you do this:

# mysql -u root -p mysql
(enter password)
mysql> UPDATE user SET Host = '%' WHERE Host = '192.168.1.210';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'
-> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;
mysql> quit;
#

'some_pass' is the password you entered for the root MySQL account.

Let me know what happens.

Peace...


----------



## Omega_Shadow (Aug 2, 2004)

I'M IN!!! IT WORKED!! EUREKA!! BANZAI! ADD MORE HAPPY PHRASES HERE!!   

The hard part is done! Thank you so much for your patience. I will look around and see what I can find toward getting zencart installed. Right now I don't know where to begin on the MySql side. If you are willing I could use a hand making databases and such.


----------



## tomdkat (May 6, 2006)

Great! Now, you should read up on MySQL security and opening up root connections like that. The change you made told MySQL to allow logins as root from ANY remote computer.

If you can get phpMyAdmin setup, you can use phpMyAdmin to create databases and userids, etc. It's a web-based interface so you shouldn't have the same kind of connectivity issues we had getting the MySQL GUI connected. Of course, your NEW task at hand will be getting phpMyAdmin up and running.  It shouldn't be too difficult.

Get a GOOD MySQL book and maybe join the MySQL forum.

Good luck!

Peace...


----------

