We help IT Professionals succeed at work.
Get Started

Problem configuring mysql on Slackware/Linux

Mark
Mark asked
on
1,108 Views
Last Modified: 2014-08-22
I'm trying to set up MySQL for the first time on a new Slackware 14.1 host. Per the init script, I first ran:

mysql_install_db --user=mysql

That appeared to work. The output from that command stated, in part:
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 MariaDB root USER !
To do so, start the server, then issue the following commands:

'/usr/bin/mysqladmin' -u root password 'new-password'
'/usr/bin/mysqladmin' -u root -h mail password 'new-password'

Alternatively you can run:
'/usr/bin/mysql_secure_installation'

Open in new window

I have no idea what lines 1 and 2 are asking me to do (right place for my system?), so I skipped that -- perhaps that's the source of my problem.

I did start the server per line 5 (/etc/rc.d/rc.mysql start); that worked. Then set the root password per line 7; that worked. But when I tried to set the password per line 8 I got the error:
/usr/bin/mysqladmin: connect to server at 'mail' failed
error: 'Can't connect to MySQL server on 'mail' (111)'
Check that mysqld is running on mail and that the port is 3306.
You can check this by doing 'telnet mail 3306'

Open in new window

Telneting to mail 3306 gives me:
$ telnet mail 3306
Trying 192.168.0.2...
telnet: connect to address 192.168.0.2: Connection refused

Open in new window

`netstat -tlpn` shows no processes named mysqld or mysqld_safe, or such-like and nothing on 3306.

ps axww gives:
29280 pts/0    S      0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/run/mysql/mysql.pid --skip-networking
29384 pts/0    Sl     0:00 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib/mysql/plugin --user=mysql --skip-networking --log-error=/var/lib/mysql/mail.err --pid-file=/var/run/mysql/mysql.pid

Open in new window

Here's the output in /var/lib/MySQL/mail.err
140818 07:10:37 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140818  7:10:37 InnoDB: The InnoDB memory heap is disabled
140818  7:10:37 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140818  7:10:37 InnoDB: Compressed tables use zlib 1.2.6
140818  7:10:37 InnoDB: Using Linux native AIO
140818  7:10:37 InnoDB: Initializing buffer pool, size = 128.0M
140818  7:10:37 InnoDB: Completed initialization of buffer pool
140818  7:10:37 InnoDB: highest supported file format is Barracuda.
140818  7:10:37  InnoDB: Waiting for the background threads to start
140818  7:10:38 Percona XtraDB (http://www.percona.com) 5.5.32-MariaDB-30.2 started; log sequence number 1597945
140818  7:10:38 [Note] Plugin 'FEEDBACK' is disabled.
140818  7:10:38 [Note] Event Scheduler: Loaded 0 events
140818  7:10:38 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.32-MariaDB'  socket: '/var/run/mysql/mysql.sock'  port: 0  MariaDB Server

Open in new window

I'm stumped. Need help!
Comment
Watch Question
Fixer of Problems
CERTIFIED EXPERT
Most Valuable Expert 2014
Commented:
This problem has been solved!
Unlock 1 Answer and 10 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE