MySql in LINUX?

Status
Not open for further replies.

paragkalra

The Linux Man !
Hi Friends,
I am well aquainted with Linux and Oracle.

I am using Suse 10.1 Linux, RHEL 4 AS, RHEL 4 WS, Fedora Core 5.

I know that in all these distros, MySql comes integrated. So no need to install.

I wanted to know how can I start MySql in LINUX in any one of these distros, particularly in RHEL.

Q1: I mean what all files I am suppose to edit and what all daemons i am suppose to start.

Q2: How exactly MySql of Linux differs from Oracle?

Q3: Are there any online tutors or free ebooks available on MySql in Linux?
 

mediator

Technomancer
Hi Parag! I am using fedora only for last 2 yrs. So in fedora u start mysql by
1. Opening terminal as root!
2. Command "service mysqld start"

For other distros the command is "/etc/init.d/mysql start" I think.

Now if u'll encounter an error saying "Failed to start mysql" or something like that i dont remember, then open up the "/etc/hosts" file and add a new entry as "127.0.0.1 localhost"!

That shud be it!
 
OP
paragkalra

paragkalra

The Linux Man !
thanx mediator, I have started the MySql in RHEL 4 WS

now what i wanna know that, is der any sample data base in mysql like oracle where u can log in as user: scott and password: tiger
 

JGuru

Wise Old Owl
@Parag, To start MySQL Server , open the Terminal Window & login as 'root' & type:

$ /etc/init.d/mysqld start

This will start the MySQL Server.

To make MySQL server start every time, when you boot Linux, login as 'root' & type:
$ chkconfig mysqld on

You can also configure it from the 'Services' in the Linux distro you are using.
Also start Apache Web Server, install it if you haven't installed it.
To start 'Apache Web Server' , login as 'root' & type:
$ /etc/init.d/httpd start

This will start the 'Apache Web Server'. Now open the browser & type:
*localhost

This will show that Apache is up & running.
Start the Apache Server first & then start MySQL server. Apache will take care
of the 'localhost' problems!!

Also download the MySQL 5.0 Documentation Click here
It contains all the information you need to get started using MySQL Database.
Goodluck.
 

GNUrag

FooBar Guy
MySQL does not contain sample database, however you can install one from sqldump files available off the net, or maybe install a CMS like Drupal, or something like Wordpress and study its DB schema. You might also want to install PHPMyAdmin to navigate the databases.

If you want to learn MySQL specific SQL Syntax, then use doc.mysql.com documentation. Online tutorials about MySQL are just huuggggeee. You just need to search for them using a good search engine.

I dunno what differences you are talking about, but MySQL comes with around 5 widely used Database engines, MyISAM and InnoDB being the most common engines. Also, the biggest plus with MySQL is the language APIs available. You can start coding with MySQL databases with almost any language. All of them have MySQL connector APIs available.
 

mediator

Technomancer
Hi parag I dunno about any temporary/sample database in mysql. But u can create any databse easily!
1. Start ur mysql service as I already told
2. From root terminal connect to mysql by commanding "mysql" and then....

a. "create user paragkalra;"
b. "create database girlfriends;"
c. "grant all privileges on girlfriends.* to 'paragkalra'@localhost identified by 'some_password';"

3. escape from root terminal, and connect from local terminal as
"mysql -u paragkalra -p girlfriends"
4. Thats it u have a username => paragkalra, database => girlfriends now! All u need to initiate everytime is step 1 and step 3 to work with mysql !!

Have fun!
 
OP
paragkalra

paragkalra

The Linux Man !
THANX mediator, jguru and GNUrag......for ur support.......my mysql database has started..........i have even created tables.......its working wonders........thanx once again......

thanx for this link:
*www.mysql.org/doc/refman/5.0/en/

It has got an excellent documentation.....

DIGIT FORUM ROCKS!!!!!
 

Desi-Tek.com

In the zone
Oracle is a proven leader in databases. It has been for a long time. It could be considered expensive, but you are buying years of experience at building a database management system. You could check out the Oracle web site.

If all you want is to run a web site that six people will see, then MySQL is good enough. It does not support stored procedures and there are gotchas:

*sql-info.de/mysql/gotchas.html

If you are just starting in databases, mysql is a good choice. Free. There are many sites on the web with tips (just google mysql), and you can learn the basics of database administration and design. Did I mention that it is free? You can probably get a web site and database up and running quickly.

If you want to start working with a database that will challenge you (some would say drive you crazy), then take that deep breadth and pay the money for Oracle. The demand for experienced DBAs and developers is there.
input from expert exchange

There are lots more differences than just mySQL is free! Really, the 2 products are not in the same league, heck, barely even in the same sport. Maybe MySQL has maybe about 10% of the features of Oracle? MySQL fanatics will try to say that all of these extra features in Oracle are overhead and somehow make the queries run noticably slower. This is just silly. I've developed a number of web application with Oracle on the backend and BIG databases. Response is instantaneous. If MySQL is faster by a few milliseconds, you would never be able to tell. I say enough with the benchmark BS, it's time for MySQL to prove itself with features and reliability. And I'll admit they're starting to do a good job of this, but really the jury is still out...

As far as tools, for Oracle you pick up TOAD and get everything you can possibly need. For MySQL, administration is gonna be tougher. You'll need to learn alot.

MySQL has come a long way. With Innodb table types, it now supports many more features you would expect from a real relational database. Subqueries, PKs, FKs, transactions, row level locking ... MySQL 4.1 opened up these doors and made it legitimate I'd call these pretty new features, but the fact that they recognize the need for these features means the MySQL is on the right track.

MySQL does not support Views, Stored Procedures, Triggers. No User Defined Data Types. Oracle supports uncorrelated and correlated subqueries up to 255 levels. Oracle supports updatable views. Transaction processing and many of the other relations database features mentioned above are inherent in Oracle, you need to use the InnoDB table type to gain these features in MySQL. Oracle has an incredible set of query functions and optimized SQL constructs allowing recursive tree-spanning resultsets, top-N, etc. Robust event-based triggers in Oracle. MySQL can handle large databases, but Oracle has TERABYTE databases in production. Oracle has integrated XML support, integrated web servers and CASE products, and extremely high-quality support.

Oracle offers free versions of all their tools to be used in a development environment, so you can learn and test using the real-deal applications, and only have to pay on deployment.

Last thing - Oracle has approx 40% of the market share in databases.

If you're in a position to ask the question, it means that your company can afford the licensing for Oracle. If you want time-proven stability, maximum flexibility and power, and excellent support and recovery options then ya gotta go Oracle. If your data is important there's no excuse, the licensing is worth it. Just try telling your client "but the database was free!" when their production server goes down.

But if the app and the data aren't as mission critical, if the data structures are simple and you can afford the bumps and bruises of the learning curve and lack of tools and support, if your company can't afford Oracle, MySQL can get the job done. And maybe your installation will be part of the proof that moves it to the next level.

A note: another free option is Postgre SQL. Postgre was miles ahead of MySQL a few years back, looks like MySQL has closed the gap but Postgre probably still has an edge feature-wise.
__________
But PostgreSQL is giving good competition to oracle and mssql.
Why PostgreSQL can best SQLServer, Oracle

Some people think PostgreSQL 8.0 is just a backend database for Web sites. They're as well informed as people who think the moon is made of cheese, according to Robert Treat and Jason Gilmore, co-authors of Apress' Beginning PHP and PostgreSQL 8: From Novice to Professional.
In many situations, the authors say, the PostgreSQL open source database management system (DBMS) can be used instead of, or as a complement to, MySQL, Oracle, Microsoft and other enterprise databases.
In this interview, Treat and Gilmore explain how and when PostgreSQL can be used in enterprise environments, as well as why end users have more control with this open source DBMS.
What sets PostgreSQL apart from other databases?
Robert Treat: As all DBMS make an attempt at implementing both the relational model and the SQL standards, there are certainly a number of similarities between PostgreSQL and all of the other database systems available. Over the years, the key differentiators I found are the structure of the PostgreSQL project, the community around it and its BSD licensing. *media.techtarget.com/searchOpenSource/images/spacer.gif
*media.techtarget.com/searchOpenSource/images/spacer.gif *media.techtarget.com/searchOpenSource/images/spacer.gif
Every other major database player has a single controlling company behind it, whether it be a database vendor like Oracle, a technology conglomerate like IBM or Microsoft or even an open source system like MySQL and Ingres. Because of this arrangement, PostgreSQL is the only database system that can offer you a full range of quality support companies, the ability to integrate PostgreSQL into proprietary systems without fee and a transparent process for getting your features added to the next release. This puts you, the end user, firmly in control of your database technology.
Is PostgreSQL a one-trick pony, suitable only for Web apps?
Jason Gilmore: Those unfamiliar with PostgreSQL tend to perceive it, like MySQL, as a database used primarily as a backend for Web sites. No doubt, there is a significant user base relying on PostgreSQL for this purpose, however its applications are much more wide-reaching.
One of the highest-profile instances of PostgreSQL's capability is the registry service provider Afilias, which relies on PostgreSQL to power both the .ORG and .INFO domain databases. As the .ORG and .INFO top level domains (TLDs) collectively account for roughly 9% of total registered domains --according to the Verisign Domain Report of August, 2005 -- we're talking about a rather significant data store, not to mention one that simply must adhere to the highest standards of reliability.
What are some other examples of PostgreSQL's capabilities?
Gilmore: Another interesting PostgreSQL implementation is Apple's Remote Desktop 2, which gathers diagnostic information about Macs deployed on a network, making it available for retrieval through any number of clients, be it the psql command-line tool, through a website or through a desktop application.
But of course, given the focus of our book, I wouldn't feel right not including a great example of a PHP- and PostgreSQL-driven website, Radio Paradise. [It's] an Internet-only radio station boasting over 29,372 users and streaming a large database of diverse music. A client of PostgreSQL services and consulting provider Command Prompt, Inc., the station is presently enjoying a great deal of success, with almost 9,000 listeners presently streaming music.
Can you compare the performance of PostgreSQL versus Oracle, MySQL or SQLServer?
Gilmore: Attempting to draw conclusions as to which database offers the best performance is often akin to debating whether vi [a screen oriented text editor] or emacs is better. (Of course, vi is.) Ultimately, such comparisons are drawn from specific environments and intent.
To be sure, a database just can't dominate every environment and intent. Just search Google for terms like "PostgreSQL MySQL benchmark" for an idea of the raging debates that arise every time a user or vendor attempts to bring a conclusive end to the matter. What is clear however, if from anything else the extraordinary number of high-profile organizations using PostgreSQL (Research in Motion, NOAA, ADP, Ameritrade and Fujitsu all come to mind), that PostgreSQL provides a very capable, not to mention cost-effective solution for many situations.
What sort of in-house skills would an IT organization/staff of any size need to use PostgreSQL? Would the skill set be similar to or less intensive than what's needed for implementing/managing MySQL, Oracle or SQLServer?
Robert Treat: Generally, most organizations find it easier to setup and administer a PostgreSQL database than commercial database systems. There are packages available for many operating systems (like Windows, Linux and Solaris), that make installation a breeze. Also, PostgreSQL tries its best to keep the number of switches and knobs to a minimum so as not to overwhelm new users.
This isn't to say that PostgreSQL doesn't provide a whole lot of functionality under the hood to help administrators obtain extremely high levels of availability and scaleability, but the philosophy of the PostgreSQL developers is that these features should not get in your way if you don't want to use them.
From a developer's standpoint, most developers coming into PostgreSQL get really excited about the complete feature set that PostgreSQL offers, as well as it's adherence to the SQL standards. Where we have seen some developers stumble is when they have to "un-learn" non-compliant tricks they may have learned from other databases, like allowing invalid dates to be accepted into the database. Once you get past these initial minor differences, it usually takes no time at all to get moving on PostgreSQL, no matter what your previous background.
Can you recommend some best practices for IT admins working with PostgreSQL 8.0?
Treat: Some of the key factors for working as a successful PostgreSQL administrator are to study up on the features that PostgreSQL offers you for maximizing performance, such as autovacuum, it's advanced indexing options, and using the explain tool to analyze SQL query performance.
The other suggestion I have is to get to know your operating system. PostgreSQL takes the standpoint that your database system should work with your operating system rather than attempt to re-implement functionality, so if you are going to maintain a PostgreSQL server, you'll want to be comfortable with the operating system it is running on.
input from
Code:
 *searchopensource.techtarget.com/tip/1,289483,sid39_gci1174224,00.html
coz this input is only for registered user thats why i copied and posted it here

Regards,
Dheeraj
 
Last edited:

GNUrag

FooBar Guy
@Desk-Teck,

Dont try to put words in our mouth. Point me the place where someone in this thread made statements comparing Oracle and MySQL.

They are different databases, under difference license terms, using different database engines. Oracle is a monster, and MySQL only supports a subset of features supported by Oracle.
 

Desi-Tek.com

In the zone
GNUrag said:
@Desk-Teck,

Dont try to put words in our mouth. Point me the place where someone in this thread made statements comparing Oracle and MySQL.

They are different databases, under difference license terms, using different database engines. Oracle is a monster, and MySQL only supports a subset of features supported by Oracle.
hmm GNU sahab i think u only read the heading.
paragkalra said:
Q2: How exactly MySql of Linux differs from Oracle?
 
Last edited:

GNUrag

FooBar Guy
That was the question paragkalra asked. Where did people compare MySQL and Oracle as you say.

Desi-Tek.com said:
On wat basis u ppl r saying that there is no difference between mysql and oracle 8i or 9i?
 
Status
Not open for further replies.
Top Bottom