PhPMyAdmin basic set up on SUSE linux 9.1

Hey,

I was wondering if anybody could help me setup my PhpMyAdmin on my SUSE linux 9.1 machine. I want to use it to access MySQL server instead of the defualt MySQLCC-Console Manager.
I have not tried yet but i have done a such and it's installed in one of the folders.
I would like to point out that i have not set up MySQL server yet; i guess i will have to set it up first?
Thanks for the help in advance.
Regards,
sybella.

More problems please help:

I have tried to register MySQL server to try and work in MySQLCC - Console manager and i'm getting the following error: "ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' ". I have tried to change the sockect path to '/tmp/mysql.sock' but still get the same error message.

Any ideals on how to solve this problem plz?

Regards,

Paul

You need at least a MySQL client library on your server wanting to run phpMyAdmin. In this case, I generally install the server distribution which contains the client as well, but I install it without configuring any server stuff (boot config, database initialization, MySQL variables etc.)

Of course, if you want to administer a database server running on the same system you need a server configured also. If you just want to administer a remote system, you don't need a local server running.

So, from your error message seems like you are trying to connect to local MySQL server. So, has it been started? On the machine running the server, you can usually do a "netstat -tln" to check the list of ports listened on (Linux, may not be on Windows/other Unix OS). You should find "3306" if the server can be started.

Note that if you connect to a local MySQL server, the client and server socket paths should match!

And one more thing. In order for phpMyAdmin to work, your PHP should be compiled with mysql extension builtin and enabled. It needs access to the client library. For some recent MySQL releases it is claimed to be able to be compiled embedded, but I have not much experience with this.

CbKihong:

I want to administer mysql server running on the same machine; its running on the same suse linux 9.1.

I did a 'netstat -tln' and the only ports listened on are: (1056,2049,898,10025,10024,5801,139,111,631,25,953,445,53,22,25,953
). I couldn't find 3306; therefore i need to start the server, but how?

I would like to mention that i did a search and found that there is phpMyAdmin in the folders: usr/share/doc/packages/ and srv/www/htdocs/.

Plus i installed MySQL Server and phpMyAdmin from the DVD/CD that came with the SUSE linux 9.1

Thanks for your help
regards,
sybella.

MySQL server can be started in a number of ways. As I haven't used SuSE for several years I have forgotten the exact configuration it uses. But in general, here are some general possibilities:

(1) I think the SuSE MySQL server RPM comes with the startup script, so it will be automatically started on startup (if without errors). Look inside /etc/init.d for the startup script. It may be called 'mysql' or something like that. Then

/etc/init.d/mysql start

If it cannot be started, you may need to read the log file to see exactly what the problem is. I think the log files are kept in /var/log/mysql. You may need to really dig it out if it is not.

This is generally the preferred way of starting a MySQL server.

(2) You may also run the mysqld_safe executable directly. But this can be a bit tricky, and if you don't have much experience it is possible that this may lead to files created in improper ownerships which create problems for future if you are to start this way.

Before you do this, please verify you really have the MySQL server installed. With most Linux distributions, the MySQL server and client are put in separate packages and so it is possible that you have installed the client but not the server. If you have server installed you should find some executables (usually in /usr/bin) with the name 'mysqld' or 'mysqld_safe' which correspond to the MySQL server.

When I installed the MySQL RPM with SuSE 7.3 several years ago the server would not start out of the box, as it was found that the file ownership were incorrect. The docs at mysql.com is quite overwhelming, but is useful in tracking down problems and fixing the common ones.

Cbkihong thanks for your help.

This is what i have done: i have executed '/etc/init.d/mysql start'; which started mySQL service.

Then 'usr/bin/mysqladmin -u root password' to try and set up new password. It came up with connection to server at 'localhost' failed. Error: 'can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'. Check that mysqld is running. How do i check its running?
I have also looked in 'var/lib/mysql/mysql.sock; it does exist but couldn't open it.

I have checked mysqld exists in 'usr/sbin'

regards,
sybella

As I said, look for port 3306 in "netstat -tln". I don't know whether the socket file will be left behind for unknown reasons but the server is not actually running.

And look for the log file for hints as I mentioned above.

I have looked for port 3306 in "netstat -tln" but it doesn't exist. The server is not running, i couldn't open the log files using '/var/log/mysql' or '/usr/local/var' (i found this on mysql manuals) - it came up with no such file or directory.

I was able to find out the version of mysql server on my box using 'mysqld -v' (mysqld ver 4.0.18 for suse -linux on i686 (source distribution)). But i can't make a trace file because my version doesn't end with debug ( according to the manuals debug versions are the only ones you can make a trace file for).
Any suggestions on this?

Some body mentioned on the user comments that mysqld to run, the directory (Slackware Users, from source)
/var/run/mysql/
must exists and owned by mysql user. I couldn't find slackware under the above directory, actually i couldn't find it at all. Do you know whether this is neccessary for the version i'm using or could it have a different name?

There was a mention that mysql must be enabled in slackware for mysqld to run. Any suggestion on this?

Thanks again for all your help.
regards,
Paul

I ran exactly into this problem when I used the SuSE MySQL server RPM some years ago. That's why I said you need to dig out where the log files are kept, as the exact error messages are recorded in there. They will give you a clue as to what is wrong and why the server won't start. You don't need to do an strace -- that's too low-level for normal use. Errors phrased in a way like "Cannot open 'xxx.frm'" in the log file are indications of permission/ownership problems for instance. If you don't have the log file ready, I think it will not be possible for us here to offer any concrete help to your problem as there are just too many reasons the server will not start.

Quote the output of "mysqld --help", the section showing the variables. In particular, I would like to see the values for "datadir", "log", "log-error" and "socket". If possible, quote the entire section. It may help locate where your log files are kept.

The output of "mysqld --help" is as follows:
"datadir": /var/lib/mysql/
"log": (No default value)
"log-error: there is no values here
"socket": /var/lib/mysql/mysql.sock

I'm going to post the entire section soon.
regards,
sybella

Quote the output of "mysqld --help", the section showing the variables. In particular, I would like to see the values for "datadir", "log", "log-error" and "socket". If possible, quote the entire section. It may help locate where your log files are kept.
[/quote]

The entire section of "mysqld --help" is as follows:

basedir /usr/
sync-frm TRUE
bind-address (No default value)
console FALSE
chroot (No default value)
character-sets-dir /usr/share/mysql/charsets/
datadir /var/lib/mysql/
default-character-set latin1
enable-locking FALSE
enable-pstack FALSE
gdb FALSE
init-file (No default value)
log (No default value)
language /usr/share/mysql/english/
local-infile TRUE
log-bin (No default value)
log-bin-index (No default value)
log-isam myisam.log
log-update (No default value)
log-slow-queries (No default value)
log-slave-updates FALSE
low-priority-updates FALSE
master-host (No default value)
master-user test
master-port 3306
master-connect-retry 60
master-retry-count 86400
master-info-file master.info
master-ssl FALSE
master-ssl-key (No default value)
master-ssl-cert (No default value)
master-ssl-capath (No default value)
master-ssl-cipher (No default value)
myisam-recover OFF
memlock FALSE
disconnect-slave-event-count 0
abort-slave-event-count 0
max-binlog-dump-events 0
sporadic-binlog-dump-fail FALSE
new FALSE
old-protocol 10
pid-file /var/lib/mysql/linux.pid
log-error
port 3306
report-host (No default value)
report-user (No default value)
report-password (No default value)
report-port 3306
rpl-recovery-rank 0
relay-log (No default value)
relay-log-index (No default value)
safe-user-create FALSE
server-id 1
show-slave-auth-info FALSE
concurrent-insert TRUE
skip-grant-tables FALSE
skip-slave-start FALSE
relay-log-info-file relay-log.info
slave-load-tmpdir /tmp/
socket /var/lib/mysql/mysql.sock
sql-bin-update-same FALSE
sql-mode OFF
temp-pool TRUE
tmpdir /tmp
external-locking FALSE
use-symbolic-links TRUE
symbolic-links TRUE
log-warnings FALSE
warnings FALSE
back_log 50
binlog_cache_size 32768
connect_timeout 5
delayed_insert_timeout 300
delayed_insert_limit 100
delayed_queue_size 1000
flush_time 0
ft_min_word_len 4
ft_max_word_len 254
ft_max_word_len_for_sort 20
ft_stopword_file (No default value)
interactive_timeout 28800
join_buffer_size 131072
key_buffer_size 16777216
long_query_time 10
lower_case_table_names 0
max_allowed_packet 1047552
max_binlog_cache_size 4294967295
max_binlog_size 1073741824
max_connections 100
max_connect_errors 10
max_delayed_threads 20
max_heap_table_size 16777216
max_join_size 4294967295
max_relay_log_size 0
max_seeks_for_key 4294967295
max_sort_length 1024
max_tmp_tables 32
max_user_connections 0
max_write_lock_count 4294967295
bulk_insert_buffer_size 8388608
myisam_block_size 1024
myisam_max_extra_sort_file_size 268435456
myisam_max_sort_file_size 2147483647
myisam_repair_threads 1
myisam_sort_buffer_size 8388608
net_buffer_length 8192
net_retry_count 10
net_read_timeout 30
net_write_timeout 60
open_files_limit 0
query_alloc_block_size 8192
query_cache_limit 1048576
query_cache_size 0
query_cache_type 1
query_prealloc_size 8192
read_buffer_size 131072
read_rnd_buffer_size 262144
record_buffer 131072
relay_log_space_limit 0
slave_compressed_protocol FALSE
slave_net_timeout 3600
range_alloc_block_size 2048
read-only FALSE
slow_launch_time 2
sort_buffer_size 524280
table_cache 64
thread_concurrency 10
thread_cache_size 0
tmp_table_size 33554432
thread_stack 196608
transaction_alloc_block_size 8192
transaction_prealloc_size 4096
wait_timeout 28800
default-week-format 0

regards,
Sybella

Ok. "ls -l" the content of "/var/lib/mysql" and "/var/log" then

Sorry cbkihong, i didn't understand the above message. Are you asking me whethere "ls -l" is the content of "/var/lib/mysql" and "/var/log"? if thats the question, i don't know the answer.
regards,
sybella

That is, quote the output of

ls -l /var/lib/mysql
ls -l /var/log

This shows the list of files inside these directories together with their permission as well as owner/group.

Cbkihong:
Thanks for your help but my problems have gone from bad to worse. Yast has a problem aswel the "Install and Remove software" doesn't open now. I found some infor on the net about it; its probably to do with the updates i did. I didn't have a lot on the box, i'm going to reinstall SUSE hopefully most of my problems will be solved.

Thanks again for your help.
Will come back if it doesn't work.

regards,
sybella.