Programmatically triggering the privileges dialog under a Lazarus application on Ubuntu - freepascal

I want to ease my father's task of installing some software that I'm developing for him.
For this I'm using Lazarus and I would like to know if there is and API to raize the privilege escalation dialog.
It seams to be hard to pin-point a single query to present on Google:
"lazarus privilege escalation" is not helping.
"lazarus privilege dialog" is not helping either.
I do realize that it's possible to ask the user to run it under gksudo, but I would like to avoid any scripting or command line using.
So I'm a bit lost in terms of where to turn.

You can use TProcess to run some tasks with privileges you need using sudo (maybe gksudo works too).
Here you have example how to do it:
http://wiki.freepascal.org/Executing_External_Programs#Redirecting_input_and_output_and_running_under_root

Related

MySQL is hiding my Routines (stored procedures)

After creating a couple of Routines in MySQL, I came back to my database and they were missing, but still showing the name.
It says that I might be lacking the privileges necessary to edit them, but that is not the case. I am logged in with the same account that created them, which is an admin account.
To see if they were in the information_schema, I ran this:
SELECT routine_definition
FROM information_schema.routines
WHERE routine_schema = 'databasename';
...but it shows two null entries.
Are my Routines completely gone? Did I do something wrong when creating them?
I've used MySQL for years and haven't had this happen before.
EDIT:
I just called the Routines and they do work... meaning they return the data. My only issue is that I cannot view or edit the code.
In Motion Hosting responded with an explanation.
Unfortunately due to the recent changes by cPanel, use of MySQL routine is not something that is officially supported on a shared hosting plan. While it may be possible to manually create it through a custom phpMyAdmin install via your cPanel credential, the interface provided by cPanel will no longer work to modify routines. If you need support for routines, you will need to upgrade to a VPS or higher plan.
From what I understand, MySQL sets the security of the routine to "DEFINER" which identifies you by your login. Once you log out and back in, that ID has changed, thereby hiding your routine code.
Similarly, the routines do not show up in a MySQL backup, either.
Depending on which hosting service you are using. Although I have researched several times on Google, I have not found any solution that works for me.
As soon as I log in with cpanel -> phpmyadmin I am unable to run routines.
I am unable to edit and export routines
Solution :
Log in as the root user of whm
From the left menu bar, search for phpmyadmin Access to PHPMyAdmin's root account
Routines will be accessible to you routine access

Using MySQL for a local database

I have written a program for a client that manages orders for his photography/souvenir business. However, I am trying to implement a DBMS for him so that he can do some analysis of the relevant trends over time.
The client's machine is a standalone Windows 8 PC.
I am attempting to use MySQL as he doesn't wish to purchase MS Access. However, he only wants it to be stored locally on the same machine he takes the orders on. How would I go about setting this up? I am new to database management so some detail would be really helpful!
You can follow MySQL's documentation to install. They have a GUI.
Once installed make sure to add a strong root password.
I would also create a database MyAwesomeNewDatabase specifically for your data. Then create a user for your application to use that is limited to just the database.
GRANT ALL PRIVILEGES ON MyAwesomeNewDatabase.* To 'user'#'localhost' IDENTIFIED BY 'password';
Then your application can use 'user' and 'password' to communicate. Specifying localhost means 'user' can only log in if on that machine, which you indicated is the case.
You indicated VB.net. You will need to install mysql-connector-net
Then in Visual Studio add reference to the dlls. Codeproject has a good tutorial on this.
You can always use DB at local computer. All you need to do is change the DB config done in your project. Change the address to localhost. I may be able to help more if i get the language you're working upon and the part of code where DB credentials are defined.
You can use Portable MySQL ,probably this Link help to you:
Designing Applications for Portability
You can always use DB at local computer Normally ...
sqlite is better for portable programming!

Tool for editing MySQL table permissions?

Is there a tool that makes the task of editing user privileges easier on a MySQL database? I've got nearly 100 tables to work through for 4 users, each with different per-table grants, which is getting tedious via phpMyAdmin. It'll get a lot more irritating when I make changes to the database structure and user list later on. I also can't see a way to do it in MySQL Workbench.
Are there any permissions management tools that make management of table permissions easier?
Update: For clarification, I need a tool that can manage the per-schema and per-table permissions for a user. I'll be changing permissions later, so it needs to be able to fully manage existing permissions as well as grant new ones. MySQL Workbench allows management of per-schema privileges, but not per-table.
Mysql gui tools . See here http://dev.mysql.com/downloads/gui-tools/5.0.html
MySQL Administrator allows you to do all that.
I realize the question is a couple of years old but I came across it while looking for a solution so I suppose others might as well.
I came across SQL Yog and find it capable of doing all that I wanted. I use the community version so it is free to download and its User Manager has the capability to set permissions at the schema and table level.
Workbench is supposed to let you manage users and grant privileges -- see here. You can also use Navicat (not free) or if you are on a mac, Sequel Pro, which is free.
MySQL Workbench provides this functionality.
Open a connection via 'Server Administration'
Click on 'Users and Privileges'
Select the 'Schema Privilegs' tab
Create entries for the schema you're working on, per your needs.
More information here.
Just looked at my install of Squirrel-SQL here. I've only got Oracle databases in this copy of it, but I use it for MySQL at home. Anyway, for Oracle, for tables, it has two tabs: Privileges, and Column Privileges. It may or may not provide similar functionality for MySQL. Give it a look perhaps. (I like it for other database work.)
Try Security Manager tool in dbForge Studio for MySQL (the Security Manager is available in free Express Edition).
In new version multi-user editing is supported; you can select some users and grant or revoke Global and Object (database, tables, fields, ...) privileges, then apply changes or view them in SQL script.
You may want to look at www.securich.com - its an open source user management tool for MySQL.
phpMyAdmin allows table-level privileges. More details can be found, for exemple, here and here.

how to find the connection string details for mysql in IIS?

I installed php and mysql on my IIS 7,
Now, I can see the phpinfo() and it all works great, except, I dont know where and what are the connection string details are for mysql.
I am trying to install wordpress (via web platform installer on IIS) and everytime I try to install it, it asks for database details - I understand why its doing that, except, I dont know what they are myself.
After a lot of googling and searching, I am surprised that there are literally NO information on how to do this, no tutorials anywhere, not even bugs on this. Either that, or I'm barking up a different solar system.
Any links to tutorials on how to do this would be very helpful. But most importantly, how do I find the details about mysql?
thanks.
Do yourself a favor and download a proper GUI for working with MySQL, such as SQLYog or something similar and forget that poo of PHPMyAdmin. As mentioned, your username is most likely root without password.
You can search for a program called mysqlinstanceconfig.exe (or something similar, you should have it in your MySQL installation folder) - it allows you to quickly reconfigure your instance and you can reset your login credidentials with it.
About MySQL GUI-s: if I'm not mistaken, there's one free coming directly from MySQL but I'm not sure about that. Forget about PHPMyAdmin, it's the worst piece of code ever written and a HUGE security hole.
As you're running a MySQL server locally, your hostname would be localhost, and you can use root as the username, and put nothing as the password.

Silent/No User Interaction modes for MySQL installation and Configuration Wizard?

I am implementing an installer for one of our products that requires MySQL as a prerequisite. I would like to have a bootstrap program that queries the user for any information needed for any prerequisite products and our product. Once the user has entered in all the necessary information they can press next and walk away while the installation proceeds.
I know the MySQl installation has the ability to perform a silent installation since it is a Windows Installer package. Can someone provide the list of properties that I would be able to set on the command line in my call to msiexec?
Another part of the installation process is running the Configuration Wizard which is auto-launched at the end of the MySQL installation only if there is user-interaction provided. I would like to know if there are any parameters that I can pass into MySQLInstanceConfig.exe in order to configure my MySQl instance without requiring user interaction?
I look forward to your suggestions.
Try this one :
http://hamidseta.blogspot.com/2008/05/install-mysql-server-50-silently.html
See on musql foruns, I found this post on the subject.
Hope it helps.