[Ubuntu-ma] Base donnees

Nordin bouchtaoui at gmail.com
Mer 28 Juil 08:53:53 BST 2010


I totally agree with you si Hassan!
If you have MySQL running on a (GNU)Linux system like CentOS, Mandriva, 
Debian or whatever flavour, you can connect to it from your Windows with 
whatever programming language. In case you use .NET I assume you use C# 
and on this link: http://bitdaddys.com/MySQL-ConnectorNet.html I found 
this peace of code:

private void button1_Click(object sender, System.EventArgs e)
		{
			string MyConString = "SERVER=localhost;" +
				"DATABASE=mydatabase;" +
				"UID=testuser;" +
				"PASSWORD=testpassword;";
			MySqlConnection connection = new MySqlConnection(MyConString);
			MySqlCommand command = connection.CreateCommand();
			MySqlDataReader Reader;
			command.CommandText = "select * from mycustomers";
			connection.Open();
			Reader = command.ExecuteReader();
			while (Reader.Read())
			{
				string thisrow = "";
				for (int i= 0;i<Reader.FieldCount;i++)
						thisrow+=Reader.GetValue(i).ToString() + ",";
				listBox1.Items.Add(thisrow);
			}
			connection.Close();
		}

It's quite easy, for connection you need this:
string MyConString = "SERVER=localhost;" +

				"DATABASE=mydatabase;" +
				"UID=testuser;" +
				"PASSWORD=testpassword;";


Replace localhost with the ip address of your Linux system running MySQL 
and complete the other information like DATABASE, UID, PASSWORD and 
you're done. But if you new to Linux, keep in mind that Linux firewall 
can block connection. So be sure you'll disable firewall and install 
MySQL well and try it out.




On 27-7-2010 20:58, Hassan Dibani wrote:
> Adnane,
>
> I really disagree with your response, and i think we should not be
> responding like this to new Linux users.
>
> Sure we all want to fix bug number 1, but that does not mean that we won't
> help windows and .net users who are trying to potentially replace a
> windows/MS SQL server box with a Linux/MySQL box. Asking them
> to completely move over to Linux before asking a question cannot be taken
> seriously.
> We live in a world where proprietary software exists and will keep existing
> (in our life time at least). We should not do the same thing that Microsoft
> does by locking users into our ecosystem, we should
> be inter-operable whenever possible. when the users see that Linux better
> suits their needs, then they will come over from themselves.
>
> If we stop potential users from even making the first step into the Linux
> world because they use .net (or whatever), then we're just shooting
> ourselves in the foot.
>
> Mr7ba bik a khouya Hammou, kif guelt lik, imken lik tkheddem ODBC bach t
> connecta sur la base MySQL li installiti sur un Serveur Ubuntu.
>
> Hassan (celui des Pays-Bas).
>
>
>
>
>
> 2010/7/27 adnane belmadiaf<adnane002 at gmail.com>
>
>    
>> Salut,
>>
>> 1 - franchement dot.net et un serveur sous GNU/Linux (Ubuntu) ca marche
>> pas :D, les gens essaye de corrigé corriger le bug n°1 [0] et toi tu veut
>> nous faire reculer 50ans en arrière.
>> 2 - on parle pas de Linux ici mais on parle de GNU/Linux [1] et plus
>> précisément d'Ubuntu.
>> 3 - si tu avait dit C, C++, java, python ou autre langage open source, on
>> pouvait essaye de donner un peu d'aide
>> 4 - si tu avait lu quelques choses sur la Team tu aurai pu voir "Ubuntu
>> Moroccan Users" et pas "Windows Moroccan Users"
>> 5 - Moi ce que je conseil c'est que tu passes à Ubuntu et comme ca  tu peut
>> développer en .Net avec Mono [2]
>>
>>
>> Al 7our bel Ghamza wel 3abd bdebza.
>>
>> [0] https://launchpad.net/ubuntu/+bug/1
>> [1] http://sebsauvage.net/comprendre/linux/
>> [2] http://www.mono-project.com/Main_Page
>>
>> Le 27 juillet 2010 18:19, ZLIGUI Hammou<hammou3 at gmail.com>  a écrit :
>>
>> Ok M.WAVER
>>      
>>> vraiment je suis dot !!!!
>>>
>>> c ma premier application en dot.net tourne en réseau . et sais pas quille
>>> serveur de base utilise
>>>
>>> mais je prefaire un serveur linux [?]
>>>
>>> j'attende vous conseil
>>>
>>>
>>>
>>>
>>> Le 27 juillet 2010 18:09, WaVeR<debian at hispeed.ch>  a écrit :
>>>
>>> Salam,
>>>        
>>>> Quelle grandeur?
>>>>
>>>>
>>>> Sous Ubuntu, je fais tourner des DBs de cette taille:
>>>>
>>>> 250G  109G  142G  44% /mounts/db1
>>>> 250G  167G   84G  67% /mounts/db2
>>>> 250G   80G  171G  32% /mounts/db3
>>>> 250G  111G  140G  45% /mounts/db4
>>>>
>>>> Engine innodDB, sans soucis. Il suffit de tuner ton fichier de conf et
>>>> que tes serveurs suivent derrière.
>>>>
>>>>
>>>> Si tu parles d'une manière générale (Linux vs Windows), ce n'est pas la
>>>> bonne mailing liste.
>>>>
>>>>
>>>> Merci
>>>>
>>>>
>>>> Espérant avoir répondu à ta question
>>>>
>>>> Le mardi 27 juillet 2010 à 17:59 +0100, ZLIGUI Hammou a écrit :
>>>>          
>>>>> Bonjour
>>>>>
>>>>> J'ai une question sur le systéme SGBD sous Linux
>>>>>
>>>>> Mysql capable de joue le rôle de sql-serveur de Windows ??
>>>>>
>>>>> la taille des données est assez grande
>>>>>
>>>>>
>>>>> Merciiiiiii
>>>>>            
>>>>
>>>> --
>>>> Ubuntu-ma mailing list
>>>> Ubuntu-ma at lists.ubuntu.com
>>>> Modify settings or unsubscribe at:
>>>> https://lists.ubuntu.com/mailman/listinfo/ubuntu-ma
>>>>
>>>>          
>>>
>>>
>>> --
>>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- HAMMOU ZLIGUI -- --
>>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>
>>> --
>>> Ubuntu-ma mailing list
>>> Ubuntu-ma at lists.ubuntu.com
>>> Modify settings or unsubscribe at:
>>> https://lists.ubuntu.com/mailman/listinfo/ubuntu-ma
>>>
>>>
>>>        
>>
>> --
>> Cordialement
>> Adnane Belmadiaf
>>
>> --
>> Ubuntu-ma mailing list
>> Ubuntu-ma at lists.ubuntu.com
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/ubuntu-ma
>>
>>
>>      
>    




Plus d'informations sur la liste de diffusion Ubuntu-ma