Control Web Panel
WebPanel => CentOS 7 Problems => Topic started by: royer_guerra@hotmail.com on February 22, 2019, 08:28:44 PM
-
someone know why not appear the domain and users email in the user CWP7?
said
No data available in table
regards
-
I did that and appears.
[root@cwp ~]# sh /scripts/cwpsrv_rebuild_user_conf
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: N
Redirecting to /bin/systemctl reload cwpsrv.service
Redirecting to /bin/systemctl reload cwp-phpfpm.service
[root@cwp ~]#
[root@cwp ~]# mysql --defaults-extra-file=/root/.my.cnf root_cwp -B -N -s -e "SELECT username FROM user"
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Some idea to resolve this issue? ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: N
Regards
-
Check your MySQL root password are exactly the same in files:
/usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php
and
/root/.my.cnf
Regards,
Netino
-
Thanks Netino, Yea is the same password.
Modify the file /scripts/cwpsrv_rebuild_user_conf
exactly this line
mysql -u root -p#password# root_cwp -B -N -s -e "SELECT username FROM user" | while read -r username
#mysql --defaults-extra-file=/root/.my.cnf root_cwp -B -N -s -e "SELECT username FROM user" | while read -r username
and run the
#sh /scripts/cwpsrv_rebuild_user_conf
With this fix can see the emails account and add acounts to each one customer but the domains still didnt appear.
Any suggestion
Regards
Roger
-
This loop is not dealing with 'domains', just only with 'user' field, to make nginx deal with 'location' of that user.
But try to execute the command, and check if your configuration is ok:
# mysql --defaults-extra-file=/root/.my.cnf root_cwp -B -N -s -e "SELECT * FROM user"
(note I changed to '*' in the command)
-
here is the output.
[root@cwp ~]# mysql --defaults-extra-file=/root/.my.cnf root_cwp -B -N -s -e "SELECT * FROM user"
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
-
Same issue ie. no domains when checking email routing etc. I checked in the DB and it's blank ie. no records.
The command: mysql --defaults-extra-file=/root/.my.cnf root_cwp -B -N -s -e "SELECT * FROM user"
Outputs the correct data for the 2 accounts I created, so I don't think it's an access issue. Those records were never created when the user account was created:
-
here is the output.
[root@cwp ~]# mysql --defaults-extra-file=/root/.my.cnf root_cwp -B -N -s -e "SELECT * FROM user"
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
This worths for you:
Check your MySQL root password are exactly the same in files:
/usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php
and
/root/.my.cnf
If the passwords are exactly the same, so you have problems in your "/root/.my.cnf" file.
you must have something like this in that file:
[client]
password=Wr3rT9r4tO8c
user=root
(obviously, the password is ficticious, adapt it to your case)
Anyway, if it still does not work, try to access directly your mysql/mariadb server, with the command:
# mysql -p root_cwp -B -N -s -e "SELECT * FROM user"
...and provide that password directly, as it ask it. It must access. If the system complains of "Access denied" then your password is wrong, you will need to reassign it.
-
Same issue ie. no domains when checking email routing etc. I checked in the DB and it's blank ie. no records.
The command: mysql --defaults-extra-file=/root/.my.cnf root_cwp -B -N -s -e "SELECT * FROM user"
Outputs the correct data for the 2 accounts I created, so I don't think it's an access issue. Those records were never created when the user account was created:
You can have problem in 'domains' table. Check if the domais are exactly the same in both tables.
-
here is the output.
[root@cwp ~]# mysql --defaults-extra-file=/root/.my.cnf root_cwp -B -N -s -e "SELECT * FROM user"
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
This worths for you:
Check your MySQL root password are exactly the same in files:
/usr/local/cwpsrv/htdocs/resources/admin/include/db_conn.php
and
/root/.my.cnf
If the passwords are exactly the same, so you have problems in your "/root/.my.cnf" file.
you must have something like this in that file:
[client]
password=Wr3rT9r4tO8c
user=root
(obviously, the password is ficticious, adapt it to your case)
Anyway, if it still does not work, try to access directly your mysql/mariadb server, with the command:
# mysql -p root_cwp -B -N -s -e "SELECT * FROM user"
...and provide that password directly, as it ask it. It must access. If the system complains of "Access denied" then your password is wrong, you will need to reassign it.
This sentence works fine. # mysql -p root_cwp -B -N -s -e "SELECT * FROM user"
-
the problem was the DB password start with #.