cPanel 11.25.1 Database Mapping!

Got a technical advisory this morning, though I would share with the rest of the world!

With version 11.25.1, cPanel introduces the Database Mapping feature. This feature lays the groundwork for providing more flexibility in naming databases and database users.

In the past, cPanel has always appended an account’s username to any database name or database username created by the account (for example, a database might be named “user_dbname”). This changes with the addition of the Database Mapping feature.

In cPanel 11.25.1, Database Mapping provides the following benefits:

1. Accounts transferred from non-cPanel servers, such as those running Plesk or Ensim, will no longer have the cPanel account name added as a prefix to the names of databases and database users. This means applications like blogs and forums should work with minimal (or no) changes after transfer.

2. Server owners can disable use of the database name prefix server-wide. If a server owner chooses this option, databases and database users will no longer be created with the cPanel account as a prefix (for example, a database could be named “dbase” instead of “user_dbase”). This option is not reversible.

Both the above features will make a server incompatible with older versions of cPanel. If either 1) a non-cPanel account is transferred to an 11.25.1 server, or 2) the server owner opts to disable prefixing, then that server will not be able to later downgrade to 11.25.0.

Likewise, transferring an account from a cPanel system that does not use the database prefix to one that does (e.g., cPanel 11.25.1 with prefixing disabled, to cPanel 11.25.0) will result in support issues. Databases and database users whose names lack the prefix will not be manageable in the cPanel interface.

What are your thought’s comments on this?  I personally don’t see this working too well with shared hosts, just due to the sheer numbers of customers.

MySQL refuses to start

MySQL refuses to start, please do the following:

Check the logs! tail -f /var/lib/mysql/$(hostname).err

The error logs will most of the time give you exactly what the error is and why MySQL is not starting. It can be any of the following.

– /var is 100% full

– database is crashed and needs to be repaired. If this is the case you can run mysqlcheck -rf db_name or if you would just like to check it and not repair mysqlcheck -rc db_name

– Incorrect permissions or a database that is not properly setup.

After you believe you have resolved the issue you can do service mysql start ; tail -f /var/lib/mysql/$(hostname).err to attempt to start MySQL while tailing the error logs.

Upgrading MySQL 4 to MySQL 5

Login to WHM as root and go to tweak settings. Under the Myql Section click version 5.0. Login to the server through shell and run


Once this is completed, make sure mysql 5 has started, run


If it fails to connect run

/etc/init.d/mysql start

If it fails to start edit the /etc/my.cnf and commend out the line Basedir=/var/lib/mysql and then start mysql

Once you have mysql 5 fully started you must recompiled php to work with the new mysql errors. You can either do this from source or from easyapache whichever you are more comfortable with. If you choose easyapache make sure you select option #7 from the easy apache menu and you do not need to make any changes.

HowTo: Import/Export mysql database from shell

To export a database run

mysqldump datbasename > databasename.sql

This will export the database to databasename.sql

To import a database from an sql dump file run

mysql databasename < dumpsqlfilename.sql

This will import the sql file into the database. Once imported you should check to make sure it was correctly imported to do this run

mysql databasename
show tables;

If the you do not see any tables listed then the sql file likely has a USE statement at the top. Edit the sql file with a text editor and comment out the line “USE databasename”. Once commented out attempt to import the data and check the tablesl.

Repairing a database

To repair a database using the default myisam storage engine use either of the two commands,

mysqlcheck -r databasename


myisamchk -f /var/lib/mysql/databasename/*.MYI

Share this site! Click on the a link below: These icons link to social bookmarking sites where readers can share and discover new web pages.