Re: Can't access mysql via Webmin or PhpMyAdmin.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mark Sargent schrieb:
Roger Grosswiler wrote:

Mark Sargent schrieb:

I can start mysql with the following cmd,

/etc/rc.d/init.d/mysql start

phpmyadmin error below,

Error

*MySQL said: *Documentation <http://dev.mysql.com/doc/mysql/en/Error-returns.html>

| #2002 - Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

I've got user as root and no password, as I haven't set 1 yet. Why am I getting this.? Anyone seen this before.?

With webmin, I get this displayed,

|*MySQL is not running on your system - database list could not be retrieved.

root@localhost ~]# ps -uxwww | grep mysql
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.3/FAQ
root 4640 0.0 0.2 4180 1116 ? S 14:19 0:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/localhost.localdomain.pid
root 4771 0.0 0.0 1580 124 pts/2 R+ 14:36 0:00 grep mysql


Hi Mark,

1) /sbin/service mysqld start -> this should start your mysql server properly


[root@localhost mysql]# /sbin/service mysqld start
mysqld: unrecognized service

I have no problems getting it started, or accessing it via cli. Thought I made that point clear.


2) have you in your config.inc.php from phpmyadmin indicated the hostname or localhost? Set it to localhost and try to connect.


Yes, the uri is correct.
$cfg['PmaAbsoluteUri'] = 'http://localhost/phpmyadmin/';


usually, when no socket is found, mysql is not running. Look in /var/lib/mysql - do you find a file called mysql.sock? If no, where does it reside now?


Yes, well, that's the weird thing, I showed where it is shown as running. Being able to access it also shows it's running.


So, there is no socket? try cd / and find -name mysql.sock perhaps it is residing in another directory.
In this case, you should indicate it in /etc/my.cnf


in the config.inc.php, there is just another section you will have to fill out:

$cfg['Servers'][$i]['host'] = 'localhost'; // MySQL hostname or IP address
$cfg['Servers'][$i]['port'] = ''; // MySQL port - leave blank for default port
$cfg['Servers'][$i]['socket'] = ''; // Path to the socket - leave blank for default socket
$cfg['Servers'][$i]['connect_type'] = 'tcp'; // How to connect to MySQL server ('tcp' or 'socket')
$cfg['Servers'][$i]['extension'] = 'mysql'; // The php MySQL extension to use ('mysql' or 'mysqli')
$cfg['Servers'][$i]['compress'] = FALSE; // Use compressed protocol for the MySQL connection
// (requires PHP >= 4.3.0)
$cfg['Servers'][$i]['controluser'] = 'root'; // MySQL control user settings
// (this user must have read-only
$cfg['Servers'][$i]['controlpass'] = ''; // access to the "mysql/user"
// and "mysql/db" tables).
// The controluser is also
// used for all relational
// features (pmadb)
$cfg['Servers'][$i]['auth_type'] = 'config'; // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed
// with 'config' auth_type)
$cfg['Servers'][$i]['only_db'] = ''; // If set to a db-name, only
// this db is displayed in left frame
// It may also be an array of


is this done?

Roger


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux