Uhhh ... "all is ok, but login is not. hosting is ok" - maybe not, other wise you'd be able to login!
Please answer questions ... what is your version of Moodle?
You said this:
"restore DB and mdl_user"
one only needs to restore the DB .. it includes mdl_user table. Did you restore something to the mdl_user table separately?
So ... again ... specific versions of Moodle would be helpful to know in order to help you - other wise may not be able to help at all.
Before issuing the following command:
mysql> select username,auth from mdl_user where username='admin';
At the mysql> prompt **you must select a database** ... the database you set up/created/imported or whatever for your moodle - found in config.php file.
mysql> use [DBNAME];
like mysql> use moodle; [ENTER] where DBNAME is the name of the DB you set up for moodle. Found in config.php file.
Then issue:
mysql> select username,auth from mdl_user where username='admin';
When reading directions for what to run, you have to adjust some times.
This:
[root@ns1 public_html]# php mysql_compressed_rows.php -i
Could not open input file: mysql_compressed_rows.php
shows you were in public_html ... you must have copied and pasted what I asked you to run which is probably not a good habit to make ...
The mysql_compressed_rows.php file is in moodlecode/admin/cli/ your moodlecode is in public_html ... I think.
and can be run via:
php mysql_compressed_rows.php
ONLY if one is in moodlecode/admin/cli/
Otherwise, at location public_html, have to provide the path to the script.
Linux 101 ... your prompt shows who you are logged in as and location:
This: [root@ns1 public_html]#
shows you were logged on as root user on the 'ns1' host and in 'public_html'.
If you do not change directories to issue moodle scripts, then ...
[root@ns1 public_html]# php admin/cli/mysql_compressed_rows.php
On a linux server, you can find out your location by using: pwd [ENTER]
'SoS', Ken
Strongly suggest finding a tutorial or something about basic command line for your distro/OS ... you could be a danger to yourself as root! and these forums are not for the purpose of teaching system admins how to admin their server. :\