Create swapfile on FreeBSD 4.x ?

Create a database user through the MySQL CLI

Through the mysql command line, this is accomplished by running the following commands. In SSH, type “mysql” to access the mysql command line. Then type: GRANT ALL PRIVILEGES ON test_database.* TO username@domain IDENTIFIED BY ‘password’; Where: test_database is the database you created above. username is the MySQL login to create domain is the domain you’ll

View the Details →

Reset mysql root password

mysqladmin command to change root password If you have never set a root password for MySQL, the server does not require a password at all for connecting as root. To setup root password for first time, use mysqladmin command at shell prompt as follows: $ mysqladmin -u root password NEWPASSWORD However, if you want to

View the Details →

Backup a database from the shell prompt

Another technique for backing up a database is to use the mysqldump program or the mysqlhotcopy script. Create a full backup of your database: shell> mysqldump –tab=/path/to/some/dir –opt db_name Or: shell> mysqlhotcopy db_name /path/to/some/dir You can a

View the Details →

Use the Load DATA statement?

After creating your table, you need to populate it. The LOAD DATA and INSERT statements are useful for this. Suppose that your pet records can be described as shown here. (Observe that MySQL expects dates in ‘YYYY-MM-DD’ format; this may be different from what you are used to.) name owner species sex birth death Fluffy

View the Details →

Secure the initial MySQL accounts?

Securing the Initial MySQL Accounts Windows distributions contain preinitialized grant tables that are installed automatically. On Unix, the grant tables are populated by the mysql_install_db program. Some installation methods run this program for you. Others require that you execute it manually. For details, see Section 2.9.2, “Unix Post-Installation Procedures”. %0

View the Details →

Change ownership of a table through MS SQL

DECLARE @old sysname, @new sysname, @sql varchar(1000) SELECT @old = ‘oldOwner_CHANGE_THIS’ , @new = ‘dbo’ , @sql = ‘ IF EXISTS (SELECT NULL FROM INFORMATION_SCHEMA.TABLES WHERE QUOTENAME(TABLE_SCHEMA)+”.”+QUOTENAME(TABLE_NAME) = ”?” AND TABLE_SCHEMA = ”’ + @old + ”’ ) EXECUTE sp_changeobjectowner ”?”, ”’ + @new + ”” EXECUTE sp_MSforeachtable @sql —– The same can be done

View the Details →

Write a stored procedure for MS SQL

Connect to your database through an application such as Enterprise Manager, go to your database, right click stored procedures and select new. Below is a basic example of a stored procedure: CREATE PROCEDURE spStoredPrcedureName @variable1 int, @variable2 varchar(64) AS select id from someTable where column1 = @variable1 AND column2 = @variable2 Go

View the Details →

How is bandwidth overage billed?

We use the 95% percentile and then convert it to GB. You will be charged .40 per GB of overages. Example: If you use 3Mbps on the 95th percentile that equals approximately 1000GB It is usually run on the 1st of every month and then charged to the account.

View the Details →

CGI files are generating internal server error

This means that the cgi script did not execute properly. There are several causes that can generate this error so a few things would need to be checked. 1) check the /var/log/httpd/suexec_log. It contains any errors that would be as a result of not having correct permissions on the file. The file needs to be

View the Details →

Lost the Direct Admin admin password

It will be in /usr/local/directadmin/scripts/setup.txt if you haven’t delete it yet or changed the password. If you have already changed it after install: – To change it from ssh as root you can just type: passwd admin ** note that DA changes quite a few things when the passwords are changed, it is highly recommended

View the Details →

Php open_basedir Tweak

Php’s open_basedir protection prevents users from opening files outside of their home directory with php scripts. You can use this function to select which accounts cannot open files outside of their home directory when using php scripts. This is an important security feature as it will prevent users from being able to access system or

View the Details →

Create a simple mail list via cPanel

How to create a simple mail list via cPanel ? If you send regular emails to a small list of customers/subscribers/friends you can create a very simple mail list via your cPanel if your ISP does not provide this feature by default with your plan. This could be done quite easy. You will need a

View the Details →

Modify an MX Record?

MX Records (or mail exchange records) are special server settings that help to control the routing of your email. By default, your email is currently routed through our server. If you wish to route your mail to a different provider, outside your hosting account, you need to create a MX record. 1. Log into your

View the Details →

Create a MySQL user

1. Log into your cPanel (http://www.yourdomain.com:2082). 2. Click on the “MySQL Databases” link. This will display the “MySQL Account Maintenance” screen. 3. Now scroll down to where it says Users. Enter your preferred username and password and click Add User. This will create a username in the format of account_username, where account is your cPanel

View the Details →