Koozali.org: home of the SME Server

Contribs.org Forums => General Discussion => Topic started by: purvis on July 15, 2007, 09:36:54 AM

Title: mysql Why bother with it?
Post by: purvis on July 15, 2007, 09:36:54 AM
i have never programmed in mysql and it seems like a big  bother to do it.
maybe i am wrong
please somebody tell i am wrong.

i have not gotten to first base with mysql on sme server 7.1.3.
i cannot even connect.
you would think after about 10 hours now after trying to supply a username and password the mysql_connect would work.
and  after following all those remarks about do this, do this, STOP.
i need something dependable.
i installed one of those packages phpmyadmin rpm packages and i freakedout, i could not access anything from a webbrowser.
and
there are a lot of posting where people are reporting all kinds of trouble then some seem to be having to reinstall.

i want something to last for 20 plus years, all software should be dependable, if it is not, do not use it.
there are lots of information on mysql from the internet, i really thought
that mysql was more simple and stable.
if a system goes down, i do not want to need an engineer for something that should be me easy to manage.
so i guess i will have to keep writing my own databases and the stuff maintance part of it.
but somebody tell me i am wrong.
thanks
Title: mysql Why bother with it?
Post by: bpivk on July 15, 2007, 12:04:30 PM
Quote
i want something to last for 20 plus years

That will never happen because the developer constantly upgrade their software. Who knows what will SME17.1 look like?

Quote
i installed one of those packages phpmyadmin rpm packages and i freakedout, i could not access anything from a webbrowser.

This should work, but you'll have to set some aditional commands if you want to use it on wan.

Quote
there are a lot of posting where people are reporting all kinds of trouble then some seem to be having to reinstall.

That's because everyone just rants on the forums. People need to start posting bugs so that they get fixed.

Quote
there are lots of information on mysql from the internet, i really thought
that mysql was more simple and stable.

Mysql is simple and stabe once you get to know it.

Quote
if a system goes down, i do not want to need an engineer for something that should be me easy to manage.

Servers are for people that know how to use them and have the necessary skills to use them. You'll have to know how they work and a few commands and you'll be set. Plug and play doesn't work on servers (linux or windows).
Title: mysql Why bother with it?
Post by: kruhm on July 15, 2007, 08:29:22 PM
certainly you searched the wiki (the main page of contribs.org)
http://wiki.contribs.org/MySQL

Possibly you may opt for a class or a good book? It may make things easier.
Title: mysql Why bother with it?
Post by: purvis on July 16, 2007, 12:05:02 AM
so basically,
if i just wanteded to run a web server i should do something like this FIRST!


from the root  

enter mysql

enter GRANT ALL PRIVILEGES ON *.* TO 'webuser' IDENTIFIED BY 'webuser';

quit mysql


then inside my php script have this code
-------------------------------------------------------------------
if ($dbc=mysql_connect ('localhost','webuser','webuser'))
{
print '<p>Successfully connected to MySQL.</p>';
mysql_close();
}
else
{
print ("hi");
   die ('<p>Could not c'''onnect to MySQL because: <b>' . mysql_error() . '</b></p>');

}
------------------------------- -----------------------------------

now that worked, who knows what is next

i just wanted to work with mysql files on a webserver and internal server.
using sme server 7.1

would this be secure from outside sources
and was there a better or safer way.
thanks for your answers
purvis
Title: Re: mysql Why bother with it?
Post by: pfloor on July 16, 2007, 12:09:15 AM
Quote from: "purvis"
i have never programmed in mysql and it seems like a big  bother to do it.
maybe i am wrong
please somebody tell i am wrong.
You are wrong.

Quote
i have not gotten to first base with mysql on sme server 7.1.3.
i cannot even connect.
Connect from where?  Commandline, Web Application, Windows desktop, etc.?

Quote
you would think after about 10 hours now after trying to supply a username and password the mysql_connect would work.
What username and password are you trying to use?  You need to create a username and password for access other than by root and horde.  The builtin passwords are 76 characters long, you don't need to remember them and it is highly insecure to let other applications access MySQL with root access.

Quote
and  after following all those remarks about do this, do this, STOP.
Do what exactly.  It is hard to offer you help if you don't tell us EXACTLY what you are trying to do and what you have already tried.

Quote
i need something dependable.
MySQL is one of the most dependable databases as evidenced by its worldwide use.  It is used by millions of web servers and has a reported 10 MILLION installations worldwide.  I don't quite understand what more you could possibly want.

Quote
i installed one of those packages phpmyadmin rpm packages and i freakedout, i could not access anything from a webbrowser.  and
there are a lot of posting where people are reporting all kinds of trouble then some seem to be having to reinstall.
Again, please be SPECIFIC and tell us exactly what package you tried to install.  There are many versions of phpmyadmn, some of them work and others don't.

Quote
i want something to last for 20 plus years, all software should be dependable, if it is not, do not use it.
MySQL was first released in 1995.  It has been around for 12 years and I will go out on a limb here and say it will be around for at least 20 more.

Quote
there are lots of information on mysql from the internet, i really thought
that mysql was more simple and stable.
Stable, ABSOLUTLY YES...Simple NO WAY.  MySQL is very robust, powerful and (like any good DB) is a VERY complicated application.  It is not a simple application by any means.  It will do almost anything and generally outperforms MSSQL.  It runs on many platforms and is very well developed and supported.  There is just no way for MySQL to be "simple"

Quote
if a system goes down, i do not want to need an engineer for something that should be me easy to manage.
If your system goes down then all you have to do is repair/rebuild it and if necessary restore your last backup (you do make regular backups don't you?).  The backup routine makes a dump of the entire MySQL database and restores it fully including any added users and passwords.

Quote
so i guess i will have to keep writing my own databases and the stuff maintance part of it.
but somebody tell me i am wrong.
thanks

I think your frustration is due to your lack of understanding of exactly how MySQL and SME work and how they are integrated together.  If you want some help here, I suggest that you tell us EXACTLY what you are trying to do and what EXACTLY you are having problems doing.  Start from the begining with the first problem and let us help you solve it.  After we solve your first problem, then lets move to the next. One by one we can try to walk you through your issues.

You may do as you please, we are not here to force you to use MySQL if you don't want to.  I will say it again, you are wrong about MySQL but probably because you don't understand it.  One you learn how it works and how good it really is, you will probably wish you could erase this thread.
Title: Re: mysql Why bother with it?
Post by: judgej on July 19, 2007, 12:38:53 AM
Quote from: "purvis"
i want something to last for 20 plus years


Oh ha, hahahhhhh. Whump. Hmmmmmmpphhhaaah.

Sorry, that's rude of me. I take it you are aged less than 20? Do you know of *any* system from 20 years ago still running and reliable now? I'm not counting getting the old Atari ST down from the loft, to find all the games on the floppy disks have degraded.

-- JJ
Title: mysql Why bother with it?
Post by: pfloor on July 19, 2007, 01:12:57 AM
Quote from: "purvis"
so basically,
if i just wanteded to run a web server i should do something like this FIRST!


from the root  

enter mysql

enter GRANT ALL PRIVILEGES ON *.* TO 'webuser' IDENTIFIED BY 'webuser';
STOP!!! Don't do that!!

The command above will grant access to the entire database to webuser.

You need to delete that user (Something like this but you might have to read the MySQL docs to get the syntax correct):

> DELETE FROM mysql.user WHERE User='webuser';
> FLUSH PRIVILEGES;

OR Possibly this:

> REVOKE ALL PRIVILEGES ON *.* FROM 'webuser';
> FLUSH PRIVILEGES;

Then you need to create a database for your web application:

> CREATE DATABASE webapp;

Then limit it's access to only webuser:

> GRANT ALL PRIVILEGES ON webapp.* TO webuser@localhost IDENTIFIED BY 'make_up_a_good_password';
>FLUSH PRIVILEGES;
Title: mysql Why bother with it?
Post by: purvis on July 20, 2007, 03:54:46 AM
well i have read a lot and really did not know that all mysql databases need users and passwords but found that out.
thanks pfloor.

it might be easier for me program my own database, that way i will not have much problems with the authenication process.
using sme server 71 as with default setups, i believe i read where outside users could not access the databases on the server unless ran by somekind of php with html or other program program such as perl.
as i am a beginner in php and mysql, i find it strange that having two databases open at the same time can be hard or at least with mysql.
it appears that one can open up a database on a mysql server other than the computer that is running the program, nice and i see the strength from mysql in that.
as one person wrote laughing about long gevity of code i could probably laugh about his code.
our code has lasted since 1982 and still using same software and databases just on some newer hardware.  The code has never changed.
which i believe unix or whatever, well it was written a long time of go.
things such as the timestamp field in mysql are very limited, if i read correctly this field can only go to the year 2037 is what i read. That is limiting, so that should have been extended.
there is a quote that goes something like this.
"if you do not have time to do it right, when are you going to find time to come back and do it right"
your not.
do not make somebody hate you and curse you in the future, have him/her praise you for the fine work that you did and do not leave it for somebody else to fix or patch, for example the problems with the year 2000 in so much code that is running today that had to be fixed.
expect good work and do good work.
i constantly praise the hard workers behind the sme server project even though they do not hear it, i recognize it every single day and my quality of life is so much better having a piece of mind on security, stability, ease of use, and deversity.
Title: mysql Why bother with it?
Post by: p-jones on July 22, 2007, 11:33:23 PM
Purvis

where are you going with this ? What are you trying to achieve ?

Do you understand that all the configuration and security in SME is operated by MySQL ?

You are currebtly heading down the road of server suicide - VERY FAST at that.
Title: mysql Why bother with it?
Post by: purvis on July 23, 2007, 07:14:26 AM
i did not see the forest for the trees.
i hope that amused you.
yes i am on a practice machine thank goodness.
i really did not understand the implications of my actions.
please set me straight.i
i was not thinking of all those other databases and how they worked.
i am use to databases being only one file, but it seems not.
i guess databases are like the newer spreadsheets(workbooks) as with spreadsheets.
it appears that tables are like stacked worksheets in one spreadsheet and you can index each one.
i was on to something different as i am not use to sql apparently.
Title: mysql Why bother with it?
Post by: CharlieBrady on July 23, 2007, 08:48:26 PM
Quote from: "p-jones"

Do you understand that all the configuration and security in SME is operated by MySQL ?


No, that isn't true. MySQL in SME server is only used to store user preferences for webmail.