i have xampp mysql server running, how do i run code? - sql

i need run code that will create a database and populate tables. i am using windows. how can i run this code?
localhost/phpmyadmin shows nothing, it's a blank page
could it be because i installed the lite version?

Point your browser to http://localhost/phpmyadmin IIRC. You may need to set that up using XAMPP's control panel first, though.

You can also connect if you have the mysql command line client which is downloadable from mysql.com. I personally prefer that, but to each his own:) If you need to execute code, you should have set up a root password when you installed or it can be done through the control panel and you can use that account in your connection string to execute the code that will populate the tables, etc.

Related

Automating Zope5 Database Pack

I tried asking on the Plone forums but no one had any good responses.
I am running Zope5, no ZeoServer, no Plone, with Apache as a frontend proxy.
In the old Zope2 there was a script called zodb-pack that could pack the database from the command line. This is no longer included with Zope5 and I am searching for a way to pack the db from the command line.
Also, Apache is setup for client certificate authentication, so I cannot do something like:
curl -X POST https://username:password#zope.domain.com
I also don't want to hardcode that type of curl statement because of the need to include the username and password.
My Zope is running in a Docker container, so I thought about doing something like:
source /zope5/bin/activate
python scriptname
with a python script along the lines of
from ZODB.DB import DB
from ZODB.config import databaseFromString
from transaction import commit
db = databaseFromString("<zodb_config>")
storage = db.storage
storage.pack(None, referencesf)
but I'm not sure that's the correct way to do this. Basically I just want my bash script that automates the backups for the server to pack the Zope DB before backing it up, but I need a command line command to do so.
I cannot use any solution that requires me to modify how Zope runs, nor requires me to stop Zope to perform the pack.
Of course I can manually go to the ZMI's Control Panel and click Pack, but like I said, I was trying to automate it so it could run in off peak hours.

MYSQL8 Permanently change password policy requirements

I am trying to change the password policy requirements in MYSQL8 (Note not MYSQL 5.7). I am using Ubuntu 20.04 server (so no GUI).
I can change them within mysql-8 by using lines such as SET GLOBAL validate_password.policy=LOW; and I can see the changes using SHOW VARIABLES LIKE 'validate_password%';, however when I restart mysql using service mysql restart they return the their default settings.
The Stack Overflow article 36301100 alludes to adding lines to mysqld.cnf file however there is no mysqld.cnf file just the mysql.cnf file under the /etc/mysql/ directory. When I add any lines such as SET GLOBAL validate_password.policy=LOW; it causes the mysql server to fail after the service mysql restart command.
Another suggestion given is to remove the password plugin with UNINSTALL COMPONENT 'file://component_validate_password';, however this strikes me as a bit harsh.
Any suggestions? Thanks, Greg

SQL Server Browser won't start

I want to start playing around with databases in Java to help with my university work however I can't get SQL Server to work properly. I've installed it using the wizard and selecting 'Basic' the installing SSMS. However when launching SSMS I get Error 26. When researching this it says to make sure that the SQL Server Browser service is running. Unfortunately this is the issue, every time I try to start the service it fails.
All the fixes I've seen about this topic have been related to servers on another machine where as I am trying to run the server on my own PC. I've tried them anyway but nothing has worked so far. The only thing I can find that might give you a clue in helping me is that in the log file it says that it failed to register the SPN.
When working on my local machine, I don't usually need SQL Server browser - but my SQL Server itself isn't set up to run automatically.
You can go to services (either via window and search for 'services', or in Windows 10 open the task manager, go to the last tab 'services'). Find the 'SQL Server' service (it helps to sort by description column) and right click -> start.
If you take note of the name (default is 'MSSQLSERVER') you can start the service (e.g., in a batch file, from command line) using sc start "MSSQLSERVER" (or whatever your server instance is called).

Remotely control a graphical vb.net program through a command prompt

I have created a VB.NET program using windows forms. The program runs on a remote PC and displays information on a screen. The computer does not even have a mouse or keyboard connected to it. The program shows the information based on the file that is loaded.
I want to be able to change this file remotely to another file that is already on the remote PC. I can't use a graphical remote desktop client as we have very limited bandwidth.
So, my idea is to change the file using the command prompt (I think I'll need something like SSH). I'm not sure how to do this. Should I use something like this and load DosModule first:
Module DOSModule
Public Sub Main()
Console.Write("First, start with Command Prompt processing ...")
Dim myWinForm As New WinForm
Application.Run(myWinForm)
End Sub
End Module
How would I then read commands that is send to the program? I also only want one instance of the program running.
Thanks
You have 2 options. The first is a custom program that WILL require some network programming, like it or not. I would suggest creating either a Command-Line batch file or else a PowerShell script, then creating a program to transfer the script to the remote computer and execute the script.
The second option and the one better suited for you would be to download an SSH server. An SSH server will essentially open a command window and pipe the input and output over to a telnet client running on your machine. If you are running a version of Windows Server, an SSH server comes with Windows Server. Otherwise, you can download one for free here: http://www.freesshd.com/
Once you install the SSH server, you simply use telnet, from a command prompt, to link up with your remote SSH server

Oracle 10g express home page is not coming up

I installed Oracle 10g express. Installation went well, But the home page is not coming up.
I can connect using sqlplus but not with Sql Developer.
I checked tnsnames.ora and listener.ora everything looks fine.
Listener is also started. I can always reinstall and see. But I thought better inquire the cause.
Regarding the home page. This is the address that comes up in browser. Localhost:8080
http://127.0.0.1:8080/apex
I did a netstat to see whether there is any port conflict for 8080, but that port is not in use.
Have anybody faced this issue?
Yes. It is practically a FAQ on the XE Oracle forum.
Firstly, can you connect to Oracle using
sqlplus user/pass
If so, Oracle is up an running (which appears to be your situation, but may not be for a future reader with a similar problem). If not, you can try
sqlplus / as sysdba
startup
Once Oracle is up, check that the listener can see the Oracle instance by
sqlplus user/pass#xe
If not, then either the listener is not up, or the 'listener does not know of the service'. Make sure the listener is started (lsnrctl, then start). Make sure the database is registered with the listener
sqlplus / as sysdba
alter system register;
Now you should be able to connect using the '#xe' syntax. Worthwhile verifying the embedded PL/SQL gateway is set up to use the 8080 port
select dbms_xdb.GETHTTPPORT from dual;
On Windows you can use netstat -ab to see if tnslsnr.exe is listening on the port.
Then I'd suggest looking at browser settings (specifically any proxy settings that might be forwarding your request to a machine that has no idea what to do with it) and firewalls (which could well be set to ignore or hide any access to the port).
I had the same problem. I tried this and it sorted out my problem...
1. goto start->run
2.type services.msc and hit enter
3.In the applet that opened, scroll down(in right pane) to figure out the option of "OracleServiceXE" and right click on it. 4. In general tab do->>> startup type "Automatic" and click the "start button".
5. Repeat step 4. for the option "OracleXETNSListener".
close the window.
now, i hope, the problem should be solved....
Check your windows firewall,If it is on it blocks the opening of the homepage.Either you shut down the windows firewall or allow these following ports :
1521: Oracle database listener
2030: Oracle Services for Microsoft Transaction Server
8080: HTTP port for Oracle XML DB and the Oracle Database XE graphical user interface
See software requirements in the below URL:
http://download.oracle.com/docs/cd/B25329_01/doc/install.102/b25143/toc.htm#BABEBCDB
It worked for me!
Try this ( I'm assuming Windows system )
using
netstat
without anyother parameter would tell you if port 8080 is already open.
Also you can try this:
telnet localhost 8080
If the server answers ( the screen goes blank [or black] ) then the server is up and running.
Try using your hostname instead of localhost.
See if you're using a proxy and not skipping the local addresses.
Also you can see what's the executable that starts the home page and see if it could start successfully.
Thanks for the response guys.
I finally figured out how to solve the issue, but not really the root cause.
Problem 1 - Can not login to oracle admin console.
It was the problem with not adding 127.0.0.1 in the IE intranet sites.
Go to tools>internet options>security>local intranet sites>advanced>
add http://127.0.0.1:8080/apex in the list.
It works fine after this.
But if I go back to the same place again and see the sites, I cant find the url I added sometimes back... Dont know why that is happening. May be some company security is messing up.
Anyways the admin console is now coming up.
Problem 2 - Cannot connect using SQL Developer.
After I did the fix for problem 1, this is also magically working.
I still don't know how security settings in IE affects SQL Developer?
Any comments on this?
hey guys one important fact if u r using IE7 (explorer7) then u wd face certain problem in using 10g, such as not displaying home page.
For Windows 8 simply click on Get Started With OracleXE.... When internet explorer opens up, select the View on the desktop option in the Page View icon (icon with a wrench).
You should now be able to view your page.
I had a similar problem, I was able to connect to SQLPLUS using terminal but on access in browser as it was showing error as you have described. So, I went back to terminal and mounted my database using
startup
and it resolved my problem. This might be the case.