Installing MySQL Server on CentOS
Posted on | May 4, 2011 | No Comments
MySQL is the commonly used relational database system when developing websites using PHP although it can be used with just about any other language including ASP, VB.NET, C#, C++, Python, and even ROR. By default on install MySQL provides its own command line tool for accessing and manipulating its databases and tables. There are also many GUI based tools provided by MySQL or third-parties such as Premiumsofts Navicat.
Installing a MySQL Server onto a CentOS server instance is a simple task that can be undertaken by just about anyone!
Your first step will be checking to make sure the server has not yet been installed. You will first have to be logged in with Root privileges or you could simply SU in to Root.
This tutorial assumes you are using the BASH shell (Bourne Again Shell).
- Type “which mysql” then hit enter. If MySQL is already installed this will output the directory that it has been installed to. If this is not returned you can now begin the MySQL install process.
- If you find that MySQL is installed and you would like to remove the existing install simply type these two commands into the shell: “yum remove mysql-server” & “yum remove mysql”
- To install MySQL Server type these three commands into your shell prompt: “yum install mysql-server” & “yum install mysql” & “yum install mysql-devel”
- If you would like to use your MySQL installation with PHP install the MySQL-PHP component by entering this into the shell: “yum install php-mysql”
Finally you will want to configure a password for MySQL as it is blank by default:
mysql mysql> USE mysql;
mysql> UPDATE user SET Password=PASSWORD(‘my-new-password’) WHERE user=’root’;
mysql> FLUSH PRIVILEGES;
Some people would like to use utilities that exist outside of the server for management. For this you will have to enable external access to the MySQL server. This can be completed easily by using the directions below.
- Modify your my.conf file using VI or whatever text editor your prefer: EX: “vi /etc/my.cnf”
- While in your text editor look for the line that reads: “[mysqld]“
- Check to make sure the line “skip-networking” is commented or add this line: “bind-address=YOUR-SERVER-IP” Replace the “YOUR-SERVER-IP” string with the IP of your server. Alternately you can comment the “bind-address” line in order to give universal access to any IP.
- Enabling “skip-networking” will force all server communication to be done through UNIX sockets.
- Save and quit. In VI this can be done by hitting the “:” key then typing “wq” to write to the open file then quit VI.
- Restart the MySQL Server by entering this into your shell: “/etc/init.d/mysql restart”
- Grant access to remote IP: Login to your MySQL server by using this string or whatever password you assigned in the first part of this tutorial. “mysql -u root -p mysql”
- Once logged in set permissions for the desired database for remote access by using this command: “update db set Host=’202.54.10.20′ where Db=’mydb’;” Replace “202.54.10.20″ with your remote IP address or set to “%” for access by any IP.
- Repeat the same for the user account you would like to use remotely: “update user set Host=’202.54.10.20′ where user=’remotedmin’;” Replace “202.54.10.20″ with your remote IP or set to “%” for access by any IP again.
- Exit MySQL: “exit”
- Enable remote access via IP Tables: “/sbin/iptables -A INPUT -i eth0 -p tcp –destination-port 3306 -j ACCEPT”
- save your IP Tables settings: “service iptables save”
Microsoft SQL Server DTS Packages
Posted on | May 4, 2011 | No Comments
DTS packages were discontinued with the release of MS SQL Server 2005 and replaced with “SQL Server Integration Services” but some organizations still make use of SQL Server versions previous to 2005.
DTS packages allow for the transformation and transfer of data from one database server to another or from one database to another database within a single server or the ability to manipulate data within a single table within a single database if the job required it. Data flow is assigned via a GUI flowchart although you could create a process entirely in C++ or Visual Basic. With each step on your data flowchart you can also create data transformations in VB or C++ or use supplied GUI tools to send the data to the appropriate database and table.
Above is an example of what the DTS package designer looks like. Each icon on the flowchart indicates the method being used. For example you have the yellow pillar bars for direct database interactivity, stacked window blocks for system or application calls, single blank windows for in package code processing.
There are three ways to create a DTS package:
1. DTS Wizards – Used for performing simple data-transformation tasks. Such as import/export.
2. DTS Designer – Pictured above allows for the creation of more complex DTS packages for including code (VB, C++), system calls, direct data-transformation.
3. DTS Query Designer – More like an extension of the second option but allows you to create database queries using a visual editor.
DTS packages can be ran directly from inside of the SQL Server Management Console but you can also run them using the command line utility known as DTSRUN.
DTSRUN syntax:
dtsrun /S server_name[\instance_name]
{ {/[~]U user_name [/[~]P password]} | /E }
]
{
{/[~]N package_name }
| {/[~]G package_guid_string}
| {/[~]V package_version_guid_string}
}
[/[~]M package_password]
[/[~]F filename]
[/[~]R repository_database_name]
[/A global_variable_name:typeid=value]
[/L log_file_name]
[/W NT_event_log_completion_status]
[/Z] [/!X] [/!D] [/!Y] [/!C]
Why are my absolute elements not being aligned within their parent element?
Posted on | January 28, 2011 | No Comments
The answer is simple! You must first assign the parent element a position of relative!
Q: Yes, but what if I need to have the parent element absolutely positioned?
A: Then you must wrap the interior of that parent element with a similarly proportioned relative element.
Q: Absolute elements can be terrible when adjusting a websites overall layout.
A: Not true! If these elements are wrapped correctly within parent elements and not assigned to absolute locations within your browsers entire viewable area, their management can be swift and easy!
Indirect… Direct…Relative… Links???
Posted on | January 24, 2011 | No Comments
Which kind of linking would be best for you? When referring to indirect links a user is typically making use of on page anchor links. This is done by referencing an anchor name or id within your markup. A direct link could be for the current domain or reference a cross-domain link. When attempting to make the pages within your site crawlable to the deepest depths this linking method is your best option. Relative links provide access to your pages and subpages within the users currently assigned domain. Relative links can be easy to use and make development easy for the most part but should be avoided ina production environment when linking to copy carrying URIs. Feel free to use these kind of links when passing access to images, stylesheets, or even JavaScript!
Back to direct linking… Direct linking is best used internally when working with larger sites due to limitations on most search engine spiders. Yes these limitations are not posted nor can I truly back up this claim but for a quick example; browse to just about any well known SEO/SEM site and you will find that they are using what is know as “Direct Internal Linking”. This method of linking is best used in mid-sized to larger websites but that does not mean you should not use it on smaller websites. Use every advantage you can get! (Direct internal linking is best used on larger sites as it makes it easier for spiders to find pages that may be hidden many sections or categories below your home page.)
Indirect linking:
page.html#anchor
Relative linking:
/page/page.html
Direct linking:
http://www.domain.com/page/page.html
« go back — keep looking »

