Thursday, August 23, 2012

Table 'mysql.servers' doesn't exist + plesk



Usually after the upgrade there errors that arise with MySQL in Plesk while creating users, errors such as "Table 'mysql.servers' doesn't exist"



To solve do the following:

1.SSH to your server

2. mysql -uadmin -p`cat /etc/psa/.psa.shadow` mysql
 
or

mysql -u YOURUSERNAMEHERE -p

Here YOURUSERNAMEHERE=Your actual user name which you are going to use.
Hit enter, you’ll be asked for your mysql password.

3: Use the mysql database command:
        USE mysql;

4.Then RUN the following:

CREATE TABLE `servers` (
`Server_name` char(64) NOT NULL,
`Host` char(64) NOT NULL,
`Db` char(64) NOT NULL,
`Username` char(64) NOT NULL,
`Password` char(64) NOT NULL,
`Port` int(4) DEFAULT NULL,
`Socket` char(64) DEFAULT NULL,
`Wrapper` char(64) NOT NULL,
`Owner` char(64) NOT NULL,
PRIMARY KEY (`Server_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table';

If you don't have access to SSH, You can do this by logging into the webadmin for MySQL via Plesk, and running the above SQL command.
After that point, you will be able to add and delete as needed

And it worked for me:)

Tuesday, August 14, 2012

Hmail server with Round cube - SMTP Error (530): Failed to add recipient (SMTP authentication is required.)

I resolve this issue.
In the roundcube config file:

$rcmail_config['smtp_user'] = '%u';
$rcmail_config['smtp_pass'] = '%p';
$rcmail_config['smtp_auth_type'] = 'LOGIN';

file can be found in RoundeCube\Config\ main.inc.php

Friday, August 10, 2012

Cannot open database “ASPState” requested by the login. The login failed. Login failed for user ‘sa’


Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Cannot open database “ASPState” requested by the login. The login failed.
Login failed for user ‘sa’.
Prompted with the infamous error as shown above. If you’re facing the same issue as mine when trying to run a web application connecting to MSSQL 2008 R2, then you might want to try:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regsql.exe -S DB_SERVER_NAME -E -ssadd -sstype p
P/S: browse to the designated folder before executing the program aspnet_regsql.exe
Hope it helps.
Update: IF you hit an error when running the command above like below:
Start adding session state.
…………………..
An error has occurred. Details of the exception:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server)
Unable to connect to SQL Server database.
Solution: Proceed to SQL Configuration Manager and browse to SQL Server Network Configuration -> Protocols for MSSQLSERVER then enable Named Pipes. Restart the SQL Server and retry executing the command.
It worked!!!!!